Showing posts with label service. Show all posts
Showing posts with label service. Show all posts

Thursday, March 29, 2012

Distributed Queries

We are using MS SQL Server 2000 service pack 4.
On our production servers the following scenerio works, our LAN
department recently rebuilt one of our development servers and we are
having problems.
On our central development server I create a temp table CREATE TABLE
#Temp(dur_code char(1) NOT NULL, tmc_code char(1) NOT NULL)
-- Inserting into the temp table on our central server from our DEV2
server works when called this way:
INSERT #temp
SELECT dur_code, tmc_code
FROM dev1.sms.dbo.term_cds
--This dynamic statement works from the central server to dev2 server
DECLARE @.vcCmd varchar(255)
SET @.vcCmd = 'SELECT dur_code, tmc_code FROM dev2.sms.dbo.term_cds'
EXEC (@.vcCmd)
-- Inserting to the same temp table on the central server from the same
DEV2 server does not work when it is called dynamically.
DECLARE @.vcCmd varchar(255)
SET @.vcCmd = 'SELECT dur_code, tmc_code FROM dev2.sms.dbo.term_cds'
INSERT #temp EXEC (@.vcCmd)
I am running this code through SQL Query Analyzer. This code works on
our central server when we call our other development server remotely
(and on all of our production servers). The Distributed Transaction
Coordinator is running on both servers.
Any ideas on what we have done wrong?Karen (karen.jones@.tusd1.org) writes:
> -- Inserting to the same temp table on the central server from the same
> DEV2 server does not work when it is called dynamically.
> DECLARE @.vcCmd varchar(255)
> SET @.vcCmd = 'SELECT dur_code, tmc_code FROM dev2.sms.dbo.term_cds'
> INSERT #temp EXEC (@.vcCmd)
What "does not work" mean? If there is an error message, please post it.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||CLARIFICATION:
We are inserting into a table on our central server and making a
dynamic call to the dev2 server.
Karen wrote:
> We are using MS SQL Server 2000 service pack 4.
> On our production servers the following scenerio works, our LAN
> department recently rebuilt one of our development servers and we are
> having problems.
> On our central development server I create a temp table CREATE TABLE
> #Temp(dur_code char(1) NOT NULL, tmc_code char(1) NOT NULL)
> -- Inserting into the temp table on our central server from our DEV2
> server works when called this way:
> INSERT #temp
> SELECT dur_code, tmc_code
> FROM dev1.sms.dbo.term_cds
>
> --This dynamic statement works from the central server to dev2 server
> DECLARE @.vcCmd varchar(255)
> SET @.vcCmd = 'SELECT dur_code, tmc_code FROM dev2.sms.dbo.term_cds'
> EXEC (@.vcCmd)
>
> -- Inserting to the same temp table on the central server from the same
> DEV2 server does not work when it is called dynamically.
> DECLARE @.vcCmd varchar(255)
> SET @.vcCmd = 'SELECT dur_code, tmc_code FROM dev2.sms.dbo.term_cds'
> INSERT #temp EXEC (@.vcCmd)
> I am running this code through SQL Query Analyzer. This code works on
> our central server when we call our other development server remotely
> (and on all of our production servers). The Distributed Transaction
> Coordinator is running on both servers.
> Any ideas on what we have done wrong?|||CLARIFICATION:
There is no error... it just hangs and never returns. It will not even
let you cancel the query, you have to end Query Analyzer through task
manager.
Erland Sommarskog wrote:
> Karen (karen.jones@.tusd1.org) writes:
> What "does not work" mean? If there is an error message, please post it.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||Karen,
Please help us out in clarifying a few points.
1. DEV1 = "Central Server"
2. DEV2 = "Development Server"
3. You have a temp table #Temp created on DEV1
4. INSERTS into #Temp succeed when executed on DEV1
5. INSERTS into #Temp FAIL when executed on DEV2
6. DEV2 does NOT have a #Temp table
#Temp tables are accessible only to the connection that created them. It is
logical that #Temp would be accessible and the INSERT would succeed when
executed from DEV1. And also that the INSERT would FAIL when you attempt to
insert into DEV1's #Temp table from code executed on DEV2.
Perhaps you need to investigate using a 'global' ##Temp table. (2 pound
signs) This form of ##Temp table is accessible by all connections and stays
in scope as long as there is any single connection open.
If I have properly understood the issue, let me know. Also you might check
in BOL about #Temp / ##Temp tables and scope.
Regards,
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"Karen" <karen.jones@.tusd1.org> wrote in message
news:1151102931.892749.87140@.p79g2000cwp.googlegroups.com...
> CLARIFICATION:
> We are inserting into a table on our central server and making a
> dynamic call to the dev2 server.
>
> Karen wrote:
>|||I am running the query on the central server through Query Analyzer.
Lets call that DEV1. The data is being added to the temp table on DEV1
from a table on DEV2.
A: The temp table exists on DEV1 and I am executing the statement on
DEV1
INSERT #temp EXEC ('SELECT x, y FROM DEV2.sms.dbo.table')
The above code works.
B:Using the same scenerio (A:) I execute the following code
DECLARE @.vcCmd varchar(255)
SET @.vcCmd = 'SELECT x, y, FROM DEV2.sms.dbo.table'
INSERT #temp EXEC(@.vcCmd)
The above code does not work.
The same code as above (example B:) works on our production servers but
does not work on one (1) of our development servers, all other
development servers can run this code just fine.
Recently our LAN staff rebuilt the DEV2 server and this is when the
problem started.
Since example A: works we know it has nothing to do with the linked
server setup
and the DTC is running.
Arnie Rowland wrote:
> Karen,
> Please help us out in clarifying a few points.
> 1. DEV1 = "Central Server"
> 2. DEV2 = "Development Server"
> 3. You have a temp table #Temp created on DEV1
> 4. INSERTS into #Temp succeed when executed on DEV1
> 5. INSERTS into #Temp FAIL when executed on DEV2
> 6. DEV2 does NOT have a #Temp table
> #Temp tables are accessible only to the connection that created them. It i
s
> logical that #Temp would be accessible and the INSERT would succeed when
> executed from DEV1. And also that the INSERT would FAIL when you attempt t
o
> insert into DEV1's #Temp table from code executed on DEV2.
> Perhaps you need to investigate using a 'global' ##Temp table. (2 pound
> signs) This form of ##Temp table is accessible by all connections and stay
s
> in scope as long as there is any single connection open.
> If I have properly understood the issue, let me know. Also you might check
> in BOL about #Temp / ##Temp tables and scope.
> Regards,
> --
> Arnie Rowland, YACE*
> "To be successful, your heart must accompany your knowledge."
> *Yet Another certification Exam
>
> "Karen" <karen.jones@.tusd1.org> wrote in message
> news:1151102931.892749.87140@.p79g2000cwp.googlegroups.com...|||Karen wrote:
> I am running the query on the central server through Query Analyzer.
> Lets call that DEV1. The data is being added to the temp table on DEV1
> from a table on DEV2.
> A: The temp table exists on DEV1 and I am executing the statement on
> DEV1
> INSERT #temp EXEC ('SELECT x, y FROM DEV2.sms.dbo.table')
> The above code works.
> B:Using the same scenerio (A:) I execute the following code
> DECLARE @.vcCmd varchar(255)
> SET @.vcCmd = 'SELECT x, y, FROM DEV2.sms.dbo.table'
> INSERT #temp EXEC(@.vcCmd)
> The above code does not work.
> The same code as above (example B:) works on our production servers but
> does not work on one (1) of our development servers, all other
> development servers can run this code just fine.
> Recently our LAN staff rebuilt the DEV2 server and this is when the
> problem started.
> Since example A: works we know it has nothing to do with the linked
> server setup
> and the DTC is running.
>
Have you looked at sysprocesses on each server while this statement is
executing? Look there for any blocking, and also see what waittype is
specified for the spid that is running your statement.
Also look at perfmon on each machine, look at CPU and Average Disk Queue
length to see if either machine is CPU or I/O bound.|||No one is using these servers except myself. No other processes are
running on either server. The table I am accessing has 10 rows. I
believe this is a configuration problem.
Tracy McKibben wrote:
> Karen wrote:
> Have you looked at sysprocesses on each server while this statement is
> executing? Look there for any blocking, and also see what waittype is
> specified for the spid that is running your statement.
> Also look at perfmon on each machine, look at CPU and Average Disk Queue
> length to see if either machine is CPU or I/O bound.|||Karen (karen.jones@.tusd1.org) writes:
> CLARIFICATION:
> There is no error... it just hangs and never returns. It will not even
> let you cancel the query, you have to end Query Analyzer through task
> manager.
Ah, this behaviour. I've have one such situation at work as well. Alas,
I don't have a solution, as I've never cared about getting it fixed.
The only difference to your description is that for me it suffices to
to:
CREATE TABLE #dates (d datetime)
go
INSERT #dates (d)
EXEC ('SELECT * FROM NEMO.sec_93_stb.dbo.dates')
I don't have to put the SQL command in a variable. (And that should not
matter.)
What I have observed is that if I look in sysprocesses on NEMO, the
machice I connect to, there is an entry for a process with host name
JAMIE4K, the machine I connect from. So my conclusion is that the problem
occurs when NEMO tries to connect back to JAMIE4K, but never get a
response. As I've said, I have not dug into this, but our symin people
are very fond of running firewalls about everywhere, and they also lock
down the service accounts for SQL Server.
It is also worth noting that NEMO, the machine I connect to, runs
Windows 2003, whereas JAMIE4K where I connect from runs Windows 2000.
I guess you will have to talk with your LAN people, and ask them to
review what they did with the network.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Karen wrote:
> No one is using these servers except myself. No other processes are
> running on either server. The table I am accessing has 10 rows. I
> believe this is a configuration problem.
>
It very well could be a configuration problem, and looking at
sysprocesses to see what waittype, if any, the process is reporting, you
might well be able to figure out what is misconfigured. Perfmon might
also reveal some important clues. Suggestion is there, use it as you wish.

Wednesday, March 21, 2012

displaying xml using reporting service web service

I'm using VS2005 web developer. I can't display XML results when using the
render method, although it renders fine.
I'm using the SQL Server 2000 reporting services web service render method
to get a byte array like this:
result = rs.Render(reportPath, format, historyID, devInfo,
parameters, _
credentials, showHideToggle, encoding, mimeType,
reportHistoryParameters, warnings, streamIDs)
This is from the sample at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_ref_soapapi_service_lz_6x0z.asp
It works great if I assign HTML4.0 and EXCEL to the "format" variable.
Then I put
response.binarywrite(result)
and it is just fine.
When I try this with the XML format, it creates a file perfectly if I put
Dim stream As FileStream = File.Create("report.xml", result.Length)
but I don't know how to display the xml in a browser.
Response.binarywrite(result) and Response.writefile("report.xml") gives me
an error
The XML page cannot be displayed.
...
Cannot have a DOCTYPE declaration outside of a prolog
I guess because the XML is written inside the html.
I would appreciate any suggestions.
Thanks
BillCorrection - response.writefile(filename) works, but I don't want to have to
create files on the server and clean them up all the time.
Thanks
Bill
"bill" <belgie@.datamti.com> wrote in message
news:ubuEOCnMGHA.2124@.TK2MSFTNGP14.phx.gbl...
> I'm using VS2005 web developer. I can't display XML results when using
> the render method, although it renders fine.
> I'm using the SQL Server 2000 reporting services web service render method
> to get a byte array like this:
> result = rs.Render(reportPath, format, historyID, devInfo,
> parameters, _
> credentials, showHideToggle, encoding, mimeType,
> reportHistoryParameters, warnings, streamIDs)
> This is from the sample at
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_ref_soapapi_service_lz_6x0z.asp
> It works great if I assign HTML4.0 and EXCEL to the "format" variable.
> Then I put
> response.binarywrite(result)
> and it is just fine.
> When I try this with the XML format, it creates a file perfectly if I put
> Dim stream As FileStream = File.Create("report.xml", result.Length)
> but I don't know how to display the xml in a browser.
> Response.binarywrite(result) and Response.writefile("report.xml") gives
> me an error
> The XML page cannot be displayed.
> ...
> Cannot have a DOCTYPE declaration outside of a prolog
> I guess because the XML is written inside the html.
> I would appreciate any suggestions.
> Thanks
> Bill
>

displaying vertical text in details section using sql reporting service

Nico,
U can change the "WritingMode" property of text box to set display
vertically.
I have another problem with the same, i want to display a text in the
details section spanning multiple rows.
below is example
S_NO NAME VERTICAL_TEXT
_______________________________
1 ABC S
2 CDE A
3 FGH M
4 IJK P
L
E
Appreciate any help!!..
VenkatCan anyone help on this?..
venkat.oar@.gmail.com wrote:
> Nico,
> U can change the "WritingMode" property of text box to set display
> vertically.
> I have another problem with the same, i want to display a text in the
> details section spanning multiple rows.
> below is example
> S_NO NAME VERTICAL_TEXT
> _______________________________
> 1 ABC S
> 2 CDE A
> 3 FGH M
> 4 IJK P
> L
> E
> Appreciate any help!!..
> Venkat

Wednesday, March 7, 2012

Displaying Aggregate Values in Header on every page

Hi all.
Product: SQL Server 2000 Reporting Services Service Pack
I am trying to display a calculated field in the Page Header for every page.
I have tried the suggestions written, but the textbox only appears on the
Page Header on the last page of the report.
For example, textbox29 in the body of my report is:
=First(Fields!Next_2_Years.Value, "AnalysisCngEECSalary")
In the Page Header, I just display the textbox:
=ReportItems!textbox29.value
The result only appears on the last page of the report. How can this result
appear on every page of the report? I tried using RepeatWith, but that did
nothing. Please help. Thanks.
--
-RB
:)Can someone please respond to this question? I appreciate it. Thanks.
--
-RB
:)
"capricorn" wrote:
> Hi all.
> Product: SQL Server 2000 Reporting Services Service Pack
> I am trying to display a calculated field in the Page Header for every page.
> I have tried the suggestions written, but the textbox only appears on the
> Page Header on the last page of the report.
> For example, textbox29 in the body of my report is:
> =First(Fields!Next_2_Years.Value, "AnalysisCngEECSalary")
> In the Page Header, I just display the textbox:
> =ReportItems!textbox29.value
> The result only appears on the last page of the report. How can this result
> appear on every page of the report? I tried using RepeatWith, but that did
> nothing. Please help. Thanks.
> --
> -RB
> :)|||It sounds like you have a data region (matrix, table, list) above textbox29
in the report layout that will grow to multiple pages at runtime. You could
set the RepeatWith value of textbox29 to the name of that particular data
region that expands over many pages - also try putting textbox29 right next
to that data region. The value should then repeat on all these pages and
will be available in the page header/footer also. BTW: you could set the
textbox29 Visibility to be always hidden - the value will still show up in
the page header/footer, but it will be hidden in the report body.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"capricorn" <capricorn@.discussions.microsoft.com> wrote in message
news:7A28CB6A-4E54-4A42-8C35-9D2894E11F3C@.microsoft.com...
> Can someone please respond to this question? I appreciate it. Thanks.
> --
> -RB
> :)
>
> "capricorn" wrote:
>> Hi all.
>> Product: SQL Server 2000 Reporting Services Service Pack
>> I am trying to display a calculated field in the Page Header for every
>> page.
>> I have tried the suggestions written, but the textbox only appears on the
>> Page Header on the last page of the report.
>> For example, textbox29 in the body of my report is:
>> =First(Fields!Next_2_Years.Value, "AnalysisCngEECSalary")
>> In the Page Header, I just display the textbox:
>> =ReportItems!textbox29.value
>> The result only appears on the last page of the report. How can this
>> result
>> appear on every page of the report? I tried using RepeatWith, but that
>> did
>> nothing. Please help. Thanks.
>> --
>> -RB
>> :)|||Robert,
I tried putting textbox29 next to table1 with the repeatwith option pointing
to table1 and this time the value of textbox29 only appears on this first
page. I tried putting textbox29 before table1 and the value still only
appears on the first page. The textbox value is not repeating with the table
that is spanning multiple pages.
--
-RB
:)
"Robert Bruckner [MSFT]" wrote:
> It sounds like you have a data region (matrix, table, list) above textbox29
> in the report layout that will grow to multiple pages at runtime. You could
> set the RepeatWith value of textbox29 to the name of that particular data
> region that expands over many pages - also try putting textbox29 right next
> to that data region. The value should then repeat on all these pages and
> will be available in the page header/footer also. BTW: you could set the
> textbox29 Visibility to be always hidden - the value will still show up in
> the page header/footer, but it will be hidden in the report body.
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "capricorn" <capricorn@.discussions.microsoft.com> wrote in message
> news:7A28CB6A-4E54-4A42-8C35-9D2894E11F3C@.microsoft.com...
> > Can someone please respond to this question? I appreciate it. Thanks.
> > --
> > -RB
> > :)
> >
> >
> > "capricorn" wrote:
> >
> >> Hi all.
> >> Product: SQL Server 2000 Reporting Services Service Pack
> >> I am trying to display a calculated field in the Page Header for every
> >> page.
> >> I have tried the suggestions written, but the textbox only appears on the
> >> Page Header on the last page of the report.
> >>
> >> For example, textbox29 in the body of my report is:
> >> =First(Fields!Next_2_Years.Value, "AnalysisCngEECSalary")
> >>
> >> In the Page Header, I just display the textbox:
> >> =ReportItems!textbox29.value
> >>
> >> The result only appears on the last page of the report. How can this
> >> result
> >> appear on every page of the report? I tried using RepeatWith, but that
> >> did
> >> nothing. Please help. Thanks.
> >> --
> >> -RB
> >> :)
>
>|||Which output format are you using? Note: RepeatWith for duplicating items in
the report body is only supported for physical page oriented renderers (such
as PDF), but at this point not for interactive renderers such as HTML.
I assume the textbox is sitting parallel to the table (not above and not
below). The correct value of that textbox should still be available in the
page header/footer.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"capricorn" <capricorn@.discussions.microsoft.com> wrote in message
news:1750AF6B-7CBE-4F21-9E98-26A60B93FF03@.microsoft.com...
> Robert,
> I tried putting textbox29 next to table1 with the repeatwith option
> pointing
> to table1 and this time the value of textbox29 only appears on this first
> page. I tried putting textbox29 before table1 and the value still only
> appears on the first page. The textbox value is not repeating with the
> table
> that is spanning multiple pages.
> --
> -RB
> :)
>
> "Robert Bruckner [MSFT]" wrote:
>> It sounds like you have a data region (matrix, table, list) above
>> textbox29
>> in the report layout that will grow to multiple pages at runtime. You
>> could
>> set the RepeatWith value of textbox29 to the name of that particular data
>> region that expands over many pages - also try putting textbox29 right
>> next
>> to that data region. The value should then repeat on all these pages and
>> will be available in the page header/footer also. BTW: you could set the
>> textbox29 Visibility to be always hidden - the value will still show up
>> in
>> the page header/footer, but it will be hidden in the report body.
>> -- Robert
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "capricorn" <capricorn@.discussions.microsoft.com> wrote in message
>> news:7A28CB6A-4E54-4A42-8C35-9D2894E11F3C@.microsoft.com...
>> > Can someone please respond to this question? I appreciate it. Thanks.
>> > --
>> > -RB
>> > :)
>> >
>> >
>> > "capricorn" wrote:
>> >
>> >> Hi all.
>> >> Product: SQL Server 2000 Reporting Services Service Pack
>> >> I am trying to display a calculated field in the Page Header for every
>> >> page.
>> >> I have tried the suggestions written, but the textbox only appears on
>> >> the
>> >> Page Header on the last page of the report.
>> >>
>> >> For example, textbox29 in the body of my report is:
>> >> =First(Fields!Next_2_Years.Value, "AnalysisCngEECSalary")
>> >>
>> >> In the Page Header, I just display the textbox:
>> >> =ReportItems!textbox29.value
>> >>
>> >> The result only appears on the last page of the report. How can this
>> >> result
>> >> appear on every page of the report? I tried using RepeatWith, but that
>> >> did
>> >> nothing. Please help. Thanks.
>> >> --
>> >> -RB
>> >> :)
>>|||Robert,
I am looking at the Preview page within the Designer. As you suggested, I
put the textbox next to the table and the textbox value is available on the
Page Header of the first page. The textbox value does not repeat on
subsequent page headers.
--
-RB
:)
"Robert Bruckner [MSFT]" wrote:
> Which output format are you using? Note: RepeatWith for duplicating items in
> the report body is only supported for physical page oriented renderers (such
> as PDF), but at this point not for interactive renderers such as HTML.
> I assume the textbox is sitting parallel to the table (not above and not
> below). The correct value of that textbox should still be available in the
> page header/footer.
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "capricorn" <capricorn@.discussions.microsoft.com> wrote in message
> news:1750AF6B-7CBE-4F21-9E98-26A60B93FF03@.microsoft.com...
> > Robert,
> > I tried putting textbox29 next to table1 with the repeatwith option
> > pointing
> > to table1 and this time the value of textbox29 only appears on this first
> > page. I tried putting textbox29 before table1 and the value still only
> > appears on the first page. The textbox value is not repeating with the
> > table
> > that is spanning multiple pages.
> > --
> > -RB
> > :)
> >
> >
> > "Robert Bruckner [MSFT]" wrote:
> >
> >> It sounds like you have a data region (matrix, table, list) above
> >> textbox29
> >> in the report layout that will grow to multiple pages at runtime. You
> >> could
> >> set the RepeatWith value of textbox29 to the name of that particular data
> >> region that expands over many pages - also try putting textbox29 right
> >> next
> >> to that data region. The value should then repeat on all these pages and
> >> will be available in the page header/footer also. BTW: you could set the
> >> textbox29 Visibility to be always hidden - the value will still show up
> >> in
> >> the page header/footer, but it will be hidden in the report body.
> >>
> >> -- Robert
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >>
> >>
> >> "capricorn" <capricorn@.discussions.microsoft.com> wrote in message
> >> news:7A28CB6A-4E54-4A42-8C35-9D2894E11F3C@.microsoft.com...
> >> > Can someone please respond to this question? I appreciate it. Thanks.
> >> > --
> >> > -RB
> >> > :)
> >> >
> >> >
> >> > "capricorn" wrote:
> >> >
> >> >> Hi all.
> >> >> Product: SQL Server 2000 Reporting Services Service Pack
> >> >> I am trying to display a calculated field in the Page Header for every
> >> >> page.
> >> >> I have tried the suggestions written, but the textbox only appears on
> >> >> the
> >> >> Page Header on the last page of the report.
> >> >>
> >> >> For example, textbox29 in the body of my report is:
> >> >> =First(Fields!Next_2_Years.Value, "AnalysisCngEECSalary")
> >> >>
> >> >> In the Page Header, I just display the textbox:
> >> >> =ReportItems!textbox29.value
> >> >>
> >> >> The result only appears on the last page of the report. How can this
> >> >> result
> >> >> appear on every page of the report? I tried using RepeatWith, but that
> >> >> did
> >> >> nothing. Please help. Thanks.
> >> >> --
> >> >> -RB
> >> >> :)
> >>
> >>
> >>
>
>