Showing posts with label sample. Show all posts
Showing posts with label sample. Show all posts

Monday, March 26, 2012

Error when replication to PDA

Dear all,
I am a new comer in replication with Pocket PC.
When I run with sample NorthwindCe application and replication with my SQL server. The following error have been occur:
Error Code :80072F76
Message : Header information is either corrupted or missing.
[,,,Header name,,]
Minor Err.: 28035
Source Microsft SQL Server 2000 Windows CE Edition
Would any one plese tell me that what's wrong has been happen in my application or setting?
Thank a lot!
Headless
What happens when you browse to your Web Server SQLCe directory?
Ie http://PublisherName/SQLCE/SSCESA10.dll or http://PublisherName/SQLCE/SSCESA20.dll
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Headless" wrote:

> Dear all,
> I am a new comer in replication with Pocket PC.
> When I run with sample NorthwindCe application and replication with my SQL server. The following error have been occur:
> Error Code :80072F76
> Message : Header information is either corrupted or missing.
> [,,,Header name,,]
> Minor Err.: 28035
> Source Microsft SQL Server 2000 Windows CE Edition
> Would any one plese tell me that what's wrong has been happen in my application or setting?
> Thank a lot!
> Headless
|||msg has been appear :
SQL Server CE Server Agent
Headless
"Hilary Cotter" wrote:
[vbcol=seagreen]
> What happens when you browse to your Web Server SQLCe directory?
> Ie http://PublisherName/SQLCE/SSCESA10.dll or http://PublisherName/SQLCE/SSCESA20.dll
> --
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
>
> "Headless" wrote:

Wednesday, March 21, 2012

Error when deploying forms authentication sample

Hello

I'm trying to get the forms authentication sample working - I have followed the instructions given in the ReadMe that came with the samples. When I try to browse to localhost/reportserver (on the server), instead of seeing the logon page as expected, I get the following error message:

An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I built the sample in VS 2005, and am using v2 of .net. Reporting services is installed on a windows server 2003 machine.

This has been driving me crazy for a while now. Any help would be greatly appreciated!

Thanks in advance

Dominic

Have a look at this.

http://blog.devstone.com/aaron/archive/2005/03/31/502.aspx

Also, try using www.sysinternals.com filemon and regmon to track down permission issues.

cheers,

Andrew

|||

I am also facing the same problem. Due you get the solution ?I

|||

I was having the same problem. I solved it changing the RSSrvPolicy.config as explained in http://msdn2.microsoft.com/en-us/ms160724.aspx

My particular mistake was in the line Url="C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll" because I had the path wrong. I corrected that and corrected the problem.

Hope this helps.

The RSSrvPolicy.config that has to be changed:

<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="$CodeGen$/*"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
Name="SecurityExtensionCodeGroup"
Description="Code group for the sample security extension"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll"
/>
</CodeGroup>

Monday, March 19, 2012

Error when deploying forms authentication sample

Hello

I'm trying to get the forms authentication sample working - I have followed the instructions given in the ReadMe that came with the samples. When I try to browse to localhost/reportserver (on the server), instead of seeing the logon page as expected, I get the following error message:

An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I built the sample in VS 2005, and am using v2 of .net. Reporting services is installed on a windows server 2003 machine.

This has been driving me crazy for a while now. Any help would be greatly appreciated!

Thanks in advance

Dominic

Have a look at this.

http://blog.devstone.com/aaron/archive/2005/03/31/502.aspx

Also, try using www.sysinternals.com filemon and regmon to track down permission issues.

cheers,

Andrew

|||

I am also facing the same problem. Due you get the solution ?I

|||

I was having the same problem. I solved it changing the RSSrvPolicy.config as explained in http://msdn2.microsoft.com/en-us/ms160724.aspx

My particular mistake was in the line Url="C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll" because I had the path wrong. I corrected that and corrected the problem.

Hope this helps.

The RSSrvPolicy.config that has to be changed:

<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="$CodeGen$/*"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
Name="SecurityExtensionCodeGroup"
Description="Code group for the sample security extension"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll"
/>
</CodeGroup>

Error when deploying forms authentication sample

Hello

I'm trying to get the forms authentication sample working - I have followed the instructions given in the ReadMe that came with the samples. When I try to browse to localhost/reportserver (on the server), instead of seeing the logon page as expected, I get the following error message:

An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I built the sample in VS 2005, and am using v2 of .net. Reporting services is installed on a windows server 2003 machine.

This has been driving me crazy for a while now. Any help would be greatly appreciated!

Thanks in advance

Dominic

Have a look at this.

http://blog.devstone.com/aaron/archive/2005/03/31/502.aspx

Also, try using www.sysinternals.com filemon and regmon to track down permission issues.

cheers,

Andrew

|||

I am also facing the same problem. Due you get the solution ?I

|||

I was having the same problem. I solved it changing the RSSrvPolicy.config as explained in http://msdn2.microsoft.com/en-us/ms160724.aspx

My particular mistake was in the line Url="C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll" because I had the path wrong. I corrected that and corrected the problem.

Hope this helps.

The RSSrvPolicy.config that has to be changed:

<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="$CodeGen$/*"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
Name="SecurityExtensionCodeGroup"
Description="Code group for the sample security extension"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll"
/>
</CodeGroup>

Friday, March 9, 2012

Error when accessing sample databases

Hey, Everyone - I have downloaded two of the sample databases and get the following error when I attempt to open them:

Unable to open the physical file "c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\Assets_Maintenance_log.ldf". Operating system error 2: "2(The system cannot find the file specified.)". (Microsoft SQL Server, Error: 5120)

So what am I doing wrong? The install of these sample databases is simple and straight-forward.

Thansk!

Regards,

Bob Mitchell

Hi,

The database file won't open this way, you have to go through the SQL Server Management studio, the file you are trying to open is ldf (Transaction Log file).

If you have just copied/extracted .mdf and .ldf files then you need to attach them using your SQL Server Management Studio, to do this

Open your SQL Server Management Studio -> Login to your Server -> Expand your server-> Expand Database Folder -> right click on Database folder -> click on attach-> select the .mdf file from the location you copied/extracted database files-> ok

this will attach database to your server, then you need to query it through query analyzer window or you may browse/open table from management studio.

Feel free to ask if you have more doubts

HTH

|||

refer this link

Running Setup to Install AdventureWorks Sample Databases and Samples :

http://msdn2.microsoft.com/en-us/library/ms143804.aspx

Madhu

|||

Thanks for the quick replies! Unfortunately, I'm still having the same problem.

I download the database executable, sse-dm_01.EXE and run it. I select my H drive for the install. The executable extracts 5 files to the folder I have chosen. None of them is a *.ldf file.

When I go to attach the database, I get the error that file c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\Assets_Maintenance_log.ldf cannot be found.

What I find confusing is that no *.ldf file is even extracted so even if I were able to point the attach to the H drive for the ldf file, it still would not find it.

Still need some help!!!

Thanks!

Regards,

Bob Mitchell

|||

Bob,

Have you found a solution to this problem?

I have been struggling with this same problem for a long time tonight, but I finally found the solution.

On the list of files at the bottom of the Attach Database screen delete the reference to the xxxxxxxx-log.ldf file that is listed as "Not Found." You can delete the reference to the file by selecting it and then pressing the Remove button. Once you have deleted the file then go ahead and click OK to complete the attachment to the database.

Hope this helps. It worked on the couple of samples I downloaded.

-eric

Error when accessing sample databases

Hey, Everyone - I have downloaded two of the sample databases and get the following error when I attempt to open them:

Unable to open the physical file "c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\Assets_Maintenance_log.ldf". Operating system error 2: "2(The system cannot find the file specified.)". (Microsoft SQL Server, Error: 5120)

So what am I doing wrong? The install of these sample databases is simple and straight-forward.

Thansk!

Regards,

Bob Mitchell

Hi,

The database file won't open this way, you have to go through the SQL Server Management studio, the file you are trying to open is ldf (Transaction Log file).

If you have just copied/extracted .mdf and .ldf files then you need to attach them using your SQL Server Management Studio, to do this

Open your SQL Server Management Studio -> Login to your Server -> Expand your server-> Expand Database Folder -> right click on Database folder -> click on attach-> select the .mdf file from the location you copied/extracted database files-> ok

this will attach database to your server, then you need to query it through query analyzer window or you may browse/open table from management studio.

Feel free to ask if you have more doubts

HTH

|||

refer this link

Running Setup to Install AdventureWorks Sample Databases and Samples :

http://msdn2.microsoft.com/en-us/library/ms143804.aspx

Madhu

|||

Thanks for the quick replies! Unfortunately, I'm still having the same problem.

I download the database executable, sse-dm_01.EXE and run it. I select my H drive for the install. The executable extracts 5 files to the folder I have chosen. None of them is a *.ldf file.

When I go to attach the database, I get the error that file c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\Assets_Maintenance_log.ldf cannot be found.

What I find confusing is that no *.ldf file is even extracted so even if I were able to point the attach to the H drive for the ldf file, it still would not find it.

Still need some help!!!

Thanks!

Regards,

Bob Mitchell

|||

Bob,

Have you found a solution to this problem?

I have been struggling with this same problem for a long time tonight, but I finally found the solution.

On the list of files at the bottom of the Attach Database screen delete the reference to the xxxxxxxx-log.ldf file that is listed as "Not Found." You can delete the reference to the file by selecting it and then pressing the Remove button. Once you have deleted the file then go ahead and click OK to complete the attachment to the database.

Hope this helps. It worked on the couple of samples I downloaded.

-eric

Sunday, February 26, 2012

Error Using # Temporary Tables in Query for Creating Reports

I am encountering error while creating a report using SQL
with # temporary tables. Here's a sample code using the
Adventureworks database:
CREATE TABLE #PRODUCTDETAILS(
[WEIGHT] [FLOAT] NULL ,
[PRODUCTNUMBER] [NVARCHAR] (25) COLLATE
SQL_LATIN1_GENERAL_CP1_CI_AS NULL ,
[STANDARDPRICE] [MONEY] NULL
) ON [PRIMARY]
INSERT INTO #PRODUCTDETAILS
SELECT WEIGHT,
PRODUCTNUMBER,
STANDARDPRICE
FROM PRODUCT A,
PRODUCTVENDOR B
WHERE A.PRODUCTID = B.PRODUCTID
SELECT * FROM #PRODUCTDETAILS
I tried to create a new report (using the wizard) with the
following SQL in the query section. When I click on the
next button, I get an error "There is an error in the
query. Invalid object name '#productdetails'". I also
tried to compile the below statements into a stored
procedure, but I get the same error when I try to generate
the report using the stored procedure.
However I found out that if I create the report manually
(without the wizard) and type all the field names as per
the output of the query, the query runs successfully in the
Data tab and I am able to generate the report.
Well, considering the fact that I have about 800 reports
to be based on stored procedures using # temporary tables,
it would be a collosal task to manually create so many
reports. I am looking for an automated way of doing this
task.
Please help!Report Designer has a graphical query designer (VDT) and text based query
designer (GQD - Generic Query Designer). When you are in Data view you can
switch between the two by clicking the third button from the left on the
query designer toolbar. Temp tables can be used provided you use the GQD.
The GQD has a couple of variations: one for stored procedures and on for
table direct. You can activate these by changing the command type to stored
procedure or table direct on the Data Set dialog.
Report Wizard only uses the VDT which means it will not work with temp
tables.
Here are a couple of suggestions for reusing reports and data sources:
Have you checked into using shared data sources? These allow you to define a
data source once and reuse it among all the reports in a project.
If your reports have a similar structure approximate template behavior by
creating the specific report you want and then placing it in
C:\ProgramFiles\Microsoft SQL Server\80\Tools\Report
Designer\ProjectItems\ReportProject directory. These reports "templates"
will show up in Report Designer's Add New Item dialog along with the Report
Wizard, Report, and Data Source templates when you add a new report to a
project.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Amar Karande" <akarande@.yahoo.com> wrote in message
news:2497501c45f84$90d4e650$a401280a@.phx.gbl...
> I am encountering error while creating a report using SQL
> with # temporary tables. Here's a sample code using the
> Adventureworks database:
> CREATE TABLE #PRODUCTDETAILS(
> [WEIGHT] [FLOAT] NULL ,
> [PRODUCTNUMBER] [NVARCHAR] (25) COLLATE
> SQL_LATIN1_GENERAL_CP1_CI_AS NULL ,
> [STANDARDPRICE] [MONEY] NULL
> ) ON [PRIMARY]
> INSERT INTO #PRODUCTDETAILS
> SELECT WEIGHT,
> PRODUCTNUMBER,
> STANDARDPRICE
> FROM PRODUCT A,
> PRODUCTVENDOR B
> WHERE A.PRODUCTID = B.PRODUCTID
> SELECT * FROM #PRODUCTDETAILS
>
> I tried to create a new report (using the wizard) with the
> following SQL in the query section. When I click on the
> next button, I get an error "There is an error in the
> query. Invalid object name '#productdetails'". I also
> tried to compile the below statements into a stored
> procedure, but I get the same error when I try to generate
> the report using the stored procedure.
> However I found out that if I create the report manually
> (without the wizard) and type all the field names as per
> the output of the query, the query runs successfully in the
> Data tab and I am able to generate the report.
> Well, considering the fact that I have about 800 reports
> to be based on stored procedures using # temporary tables,
> it would be a collosal task to manually create so many
> reports. I am looking for an automated way of doing this
> task.
> Please help!|||Amar,
I have been trying to find where I wrote down the solution to this. I hit
this same problem and from memory, was able to fix it by ensuring that the
fields returned in the query were not prefixed with the table name. e.g.
EmployyID rather than #employee.EmployeeID.
I will continue to see if I can find where I wrote it down. Let me know if
this fixes it.
Brian Boyce
"Amar Karande" <akarande@.yahoo.com> wrote in message
news:2497501c45f84$90d4e650$a401280a@.phx.gbl...
> I am encountering error while creating a report using SQL
> with # temporary tables. Here's a sample code using the
> Adventureworks database:
> CREATE TABLE #PRODUCTDETAILS(
> [WEIGHT] [FLOAT] NULL ,
> [PRODUCTNUMBER] [NVARCHAR] (25) COLLATE
> SQL_LATIN1_GENERAL_CP1_CI_AS NULL ,
> [STANDARDPRICE] [MONEY] NULL
> ) ON [PRIMARY]
> INSERT INTO #PRODUCTDETAILS
> SELECT WEIGHT,
> PRODUCTNUMBER,
> STANDARDPRICE
> FROM PRODUCT A,
> PRODUCTVENDOR B
> WHERE A.PRODUCTID = B.PRODUCTID
> SELECT * FROM #PRODUCTDETAILS
>
> I tried to create a new report (using the wizard) with the
> following SQL in the query section. When I click on the
> next button, I get an error "There is an error in the
> query. Invalid object name '#productdetails'". I also
> tried to compile the below statements into a stored
> procedure, but I get the same error when I try to generate
> the report using the stored procedure.
> However I found out that if I create the report manually
> (without the wizard) and type all the field names as per
> the output of the query, the query runs successfully in the
> Data tab and I am able to generate the report.
> Well, considering the fact that I have about 800 reports
> to be based on stored procedures using # temporary tables,
> it would be a collosal task to manually create so many
> reports. I am looking for an automated way of doing this
> task.
> Please help!|||Bruce,
I am using Generic Query Designer and it does not work
there either, unless you explicitly define the fields in
the Dataset properties. It seems like reporting services
engine is not able to retrieve fields from the temporary
table. Guess why? Because it does not exist.
As per your second suggestion, I think that might not work
too well in my case, because the report layouts (columns)
are very different.
The million dollar question for me is, would I have to
manually create reports from stored procedures, i.e.
define fields manually in the dataset? If thats the case,
it will take me forever to migrate to Reporting Services.
I am sure there should be a way around it. Atleast I hope
so :(
Thanks,
Amar
>--Original Message--
>Report Designer has a graphical query designer (VDT) and
text based query
>designer (GQD - Generic Query Designer). When you are in
Data view you can
>switch between the two by clicking the third button from
the left on the
>query designer toolbar. Temp tables can be used provided
you use the GQD.
>The GQD has a couple of variations: one for stored
procedures and on for
>table direct. You can activate these by changing the
command type to stored
>procedure or table direct on the Data Set dialog.
>Report Wizard only uses the VDT which means it will not
work with temp
>tables.
>Here are a couple of suggestions for reusing reports and
data sources:
>Have you checked into using shared data sources? These
allow you to define a
>data source once and reuse it among all the reports in a
project.
>If your reports have a similar structure approximate
template behavior by
>creating the specific report you want and then placing it
in
>C:\ProgramFiles\Microsoft SQL Server\80\Tools\Report
>Designer\ProjectItems\ReportProject directory. These
reports "templates"
>will show up in Report Designer's Add New Item dialog
along with the Report
>Wizard, Report, and Data Source templates when you add a
new report to a
>project.
>--
>Bruce Johnson [MSFT]
>Microsoft SQL Server Reporting Services
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>
>"Amar Karande" <akarande@.yahoo.com> wrote in message
>news:2497501c45f84$90d4e650$a401280a@.phx.gbl...
>> I am encountering error while creating a report using
SQL
>> with # temporary tables. Here's a sample code using the
>> Adventureworks database:
>> CREATE TABLE #PRODUCTDETAILS(
>> [WEIGHT] [FLOAT] NULL ,
>> [PRODUCTNUMBER] [NVARCHAR] (25) COLLATE
>> SQL_LATIN1_GENERAL_CP1_CI_AS NULL ,
>> [STANDARDPRICE] [MONEY] NULL
>> ) ON [PRIMARY]
>> INSERT INTO #PRODUCTDETAILS
>> SELECT WEIGHT,
>> PRODUCTNUMBER,
>> STANDARDPRICE
>> FROM PRODUCT A,
>> PRODUCTVENDOR B
>> WHERE A.PRODUCTID = B.PRODUCTID
>> SELECT * FROM #PRODUCTDETAILS
>>
>> I tried to create a new report (using the wizard) with
the
>> following SQL in the query section. When I click on the
>> next button, I get an error "There is an error in the
>> query. Invalid object name '#productdetails'". I also
>> tried to compile the below statements into a stored
>> procedure, but I get the same error when I try to
generate
>> the report using the stored procedure.
>> However I found out that if I create the report manually
>> (without the wizard) and type all the field names as per
>> the output of the query, the query runs successfully in
the
>> Data tab and I am able to generate the report.
>> Well, considering the fact that I have about 800 reports
>> to be based on stored procedures using # temporary
tables,
>> it would be a collosal task to manually create so many
>> reports. I am looking for an automated way of doing this
>> task.
>> Please help!
>
>.
>|||Brian,
My query is set up to do a select * from #Temp table.
Should I do something else?
Thanks,
Amar
>--Original Message--
>Amar,
>I have been trying to find where I wrote down the
solution to this. I hit
>this same problem and from memory, was able to fix it by
ensuring that the
>fields returned in the query were not prefixed with the
table name. e.g.
>EmployyID rather than #employee.EmployeeID.
>I will continue to see if I can find where I wrote it
down. Let me know if
>this fixes it.
>Brian Boyce
>"Amar Karande" <akarande@.yahoo.com> wrote in message
>news:2497501c45f84$90d4e650$a401280a@.phx.gbl...
>> I am encountering error while creating a report using
SQL
>> with # temporary tables. Here's a sample code using the
>> Adventureworks database:
>> CREATE TABLE #PRODUCTDETAILS(
>> [WEIGHT] [FLOAT] NULL ,
>> [PRODUCTNUMBER] [NVARCHAR] (25) COLLATE
>> SQL_LATIN1_GENERAL_CP1_CI_AS NULL ,
>> [STANDARDPRICE] [MONEY] NULL
>> ) ON [PRIMARY]
>> INSERT INTO #PRODUCTDETAILS
>> SELECT WEIGHT,
>> PRODUCTNUMBER,
>> STANDARDPRICE
>> FROM PRODUCT A,
>> PRODUCTVENDOR B
>> WHERE A.PRODUCTID = B.PRODUCTID
>> SELECT * FROM #PRODUCTDETAILS
>>
>> I tried to create a new report (using the wizard) with
the
>> following SQL in the query section. When I click on the
>> next button, I get an error "There is an error in the
>> query. Invalid object name '#productdetails'". I also
>> tried to compile the below statements into a stored
>> procedure, but I get the same error when I try to
generate
>> the report using the stored procedure.
>> However I found out that if I create the report manually
>> (without the wizard) and type all the field names as per
>> the output of the query, the query runs successfully in
the
>> Data tab and I am able to generate the report.
>> Well, considering the fact that I have about 800 reports
>> to be based on stored procedures using # temporary
tables,
>> it would be a collosal task to manually create so many
>> reports. I am looking for an automated way of doing this
>> task.
>> Please help!
>
>.
>|||Temporary table used in stored procedures from SQL Server work just fine. I
do this all the time. I have had trouble going against Sybase but works
great for SQL Server. Make sure you have set the command type to
StoredProcedure. There there is a little used button that looks like the
refresh button for IE. If you hoover over it, it will say refresh fields.
Click on it and your field list will update to the correct fields returned.
I did this with the code you posted. You can be in either query designers.
No need to add fields by hand. I only do this if I have a calculated field I
want to add (a handy little trick to remember).
Bruce L-C
"Amar Karande" <akarande@.yahoo.com> wrote in message
news:249dd01c45f8e$ae354d20$a501280a@.phx.gbl...
> Bruce,
> I am using Generic Query Designer and it does not work
> there either, unless you explicitly define the fields in
> the Dataset properties. It seems like reporting services
> engine is not able to retrieve fields from the temporary
> table. Guess why? Because it does not exist.
> As per your second suggestion, I think that might not work
> too well in my case, because the report layouts (columns)
> are very different.
> The million dollar question for me is, would I have to
> manually create reports from stored procedures, i.e.
> define fields manually in the dataset? If thats the case,
> it will take me forever to migrate to Reporting Services.
> I am sure there should be a way around it. Atleast I hope
> so :(
> Thanks,
> Amar
> >--Original Message--
> >Report Designer has a graphical query designer (VDT) and
> text based query
> >designer (GQD - Generic Query Designer). When you are in
> Data view you can
> >switch between the two by clicking the third button from
> the left on the
> >query designer toolbar. Temp tables can be used provided
> you use the GQD.
> >
> >The GQD has a couple of variations: one for stored
> procedures and on for
> >table direct. You can activate these by changing the
> command type to stored
> >procedure or table direct on the Data Set dialog.
> >
> >Report Wizard only uses the VDT which means it will not
> work with temp
> >tables.
> >
> >Here are a couple of suggestions for reusing reports and
> data sources:
> >
> >Have you checked into using shared data sources? These
> allow you to define a
> >data source once and reuse it among all the reports in a
> project.
> >
> >If your reports have a similar structure approximate
> template behavior by
> >creating the specific report you want and then placing it
> in
> >C:\ProgramFiles\Microsoft SQL Server\80\Tools\Report
> >Designer\ProjectItems\ReportProject directory. These
> reports "templates"
> >will show up in Report Designer's Add New Item dialog
> along with the Report
> >Wizard, Report, and Data Source templates when you add a
> new report to a
> >project.
> >
> >--
> >Bruce Johnson [MSFT]
> >Microsoft SQL Server Reporting Services
> >
> >This posting is provided "AS IS" with no warranties, and
> confers no rights.
> >
> >
> >"Amar Karande" <akarande@.yahoo.com> wrote in message
> >news:2497501c45f84$90d4e650$a401280a@.phx.gbl...
> >> I am encountering error while creating a report using
> SQL
> >> with # temporary tables. Here's a sample code using the
> >> Adventureworks database:
> >>
> >> CREATE TABLE #PRODUCTDETAILS(
> >> [WEIGHT] [FLOAT] NULL ,
> >> [PRODUCTNUMBER] [NVARCHAR] (25) COLLATE
> >> SQL_LATIN1_GENERAL_CP1_CI_AS NULL ,
> >> [STANDARDPRICE] [MONEY] NULL
> >> ) ON [PRIMARY]
> >>
> >> INSERT INTO #PRODUCTDETAILS
> >> SELECT WEIGHT,
> >> PRODUCTNUMBER,
> >> STANDARDPRICE
> >> FROM PRODUCT A,
> >> PRODUCTVENDOR B
> >> WHERE A.PRODUCTID = B.PRODUCTID
> >>
> >> SELECT * FROM #PRODUCTDETAILS
> >>
> >>
> >> I tried to create a new report (using the wizard) with
> the
> >> following SQL in the query section. When I click on the
> >> next button, I get an error "There is an error in the
> >> query. Invalid object name '#productdetails'". I also
> >> tried to compile the below statements into a stored
> >> procedure, but I get the same error when I try to
> generate
> >> the report using the stored procedure.
> >>
> >> However I found out that if I create the report manually
> >> (without the wizard) and type all the field names as per
> >> the output of the query, the query runs successfully in
> the
> >> Data tab and I am able to generate the report.
> >>
> >> Well, considering the fact that I have about 800 reports
> >> to be based on stored procedures using # temporary
> tables,
> >> it would be a collosal task to manually create so many
> >> reports. I am looking for an automated way of doing this
> >> task.
> >>
> >> Please help!
> >
> >
> >.
> >|||It sure works:) I hope it worked through the wizard. That
would have saved me a lottttt of time. Some of my reports
have 40 columns :(
>--Original Message--
>Temporary table used in stored procedures from SQL Server
work just fine. I
>do this all the time. I have had trouble going against
Sybase but works
>great for SQL Server. Make sure you have set the command
type to
>StoredProcedure. There there is a little used button that
looks like the
>refresh button for IE. If you hoover over it, it will say
refresh fields.
>Click on it and your field list will update to the
correct fields returned.
>I did this with the code you posted. You can be in either
query designers.
>No need to add fields by hand. I only do this if I have a
calculated field I
>want to add (a handy little trick to remember).
>Bruce L-C
>"Amar Karande" <akarande@.yahoo.com> wrote in message
>news:249dd01c45f8e$ae354d20$a501280a@.phx.gbl...
>> Bruce,
>> I am using Generic Query Designer and it does not work
>> there either, unless you explicitly define the fields in
>> the Dataset properties. It seems like reporting services
>> engine is not able to retrieve fields from the temporary
>> table. Guess why? Because it does not exist.
>> As per your second suggestion, I think that might not
work
>> too well in my case, because the report layouts
(columns)
>> are very different.
>> The million dollar question for me is, would I have to
>> manually create reports from stored procedures, i.e.
>> define fields manually in the dataset? If thats the
case,
>> it will take me forever to migrate to Reporting
Services.
>> I am sure there should be a way around it. Atleast I
hope
>> so :(
>> Thanks,
>> Amar
>> >--Original Message--
>> >Report Designer has a graphical query designer (VDT)
and
>> text based query
>> >designer (GQD - Generic Query Designer). When you are
in
>> Data view you can
>> >switch between the two by clicking the third button
from
>> the left on the
>> >query designer toolbar. Temp tables can be used
provided
>> you use the GQD.
>> >
>> >The GQD has a couple of variations: one for stored
>> procedures and on for
>> >table direct. You can activate these by changing the
>> command type to stored
>> >procedure or table direct on the Data Set dialog.
>> >
>> >Report Wizard only uses the VDT which means it will not
>> work with temp
>> >tables.
>> >
>> >Here are a couple of suggestions for reusing reports
and
>> data sources:
>> >
>> >Have you checked into using shared data sources? These
>> allow you to define a
>> >data source once and reuse it among all the reports in
a
>> project.
>> >
>> >If your reports have a similar structure approximate
>> template behavior by
>> >creating the specific report you want and then placing
it
>> in
>> >C:\ProgramFiles\Microsoft SQL Server\80\Tools\Report
>> >Designer\ProjectItems\ReportProject directory. These
>> reports "templates"
>> >will show up in Report Designer's Add New Item dialog
>> along with the Report
>> >Wizard, Report, and Data Source templates when you add
a
>> new report to a
>> >project.
>> >
>> >--
>> >Bruce Johnson [MSFT]
>> >Microsoft SQL Server Reporting Services
>> >
>> >This posting is provided "AS IS" with no warranties,
and
>> confers no rights.
>> >
>> >
>> >"Amar Karande" <akarande@.yahoo.com> wrote in message
>> >news:2497501c45f84$90d4e650$a401280a@.phx.gbl...
>> >> I am encountering error while creating a report using
>> SQL
>> >> with # temporary tables. Here's a sample code using
the
>> >> Adventureworks database:
>> >>
>> >> CREATE TABLE #PRODUCTDETAILS(
>> >> [WEIGHT] [FLOAT] NULL ,
>> >> [PRODUCTNUMBER] [NVARCHAR] (25) COLLATE
>> >> SQL_LATIN1_GENERAL_CP1_CI_AS NULL ,
>> >> [STANDARDPRICE] [MONEY] NULL
>> >> ) ON [PRIMARY]
>> >>
>> >> INSERT INTO #PRODUCTDETAILS
>> >> SELECT WEIGHT,
>> >> PRODUCTNUMBER,
>> >> STANDARDPRICE
>> >> FROM PRODUCT A,
>> >> PRODUCTVENDOR B
>> >> WHERE A.PRODUCTID = B.PRODUCTID
>> >>
>> >> SELECT * FROM #PRODUCTDETAILS
>> >>
>> >>
>> >> I tried to create a new report (using the wizard)
with
>> the
>> >> following SQL in the query section. When I click on
the
>> >> next button, I get an error "There is an error in the
>> >> query. Invalid object name '#productdetails'". I also
>> >> tried to compile the below statements into a stored
>> >> procedure, but I get the same error when I try to
>> generate
>> >> the report using the stored procedure.
>> >>
>> >> However I found out that if I create the report
manually
>> >> (without the wizard) and type all the field names as
per
>> >> the output of the query, the query runs successfully
in
>> the
>> >> Data tab and I am able to generate the report.
>> >>
>> >> Well, considering the fact that I have about 800
reports
>> >> to be based on stored procedures using # temporary
>> tables,
>> >> it would be a collosal task to manually create so
many
>> >> reports. I am looking for an automated way of doing
this
>> >> task.
>> >>
>> >> Please help!
>> >
>> >
>> >.
>> >
>
>.
>

error uploading sample reports

Every time I goto upload the sample reports that come with Reporting Services (AdventureWorks), I get the following error message. I have built a simple report from scratch and uploaded it to the report server and it was OK. I only get the error with the sample reports. Anyone have a fix for this.I can't figure it out.

Reporting Services Error

An error has occurred during report processing. (rsProcessingAborted) Get Online Help Cannot create a connection to data source 'AdventureWorks'. (rsErrorOpeningConnection) Get Online Help SQL Server does not exist or access denied.Are you sure the AdventureWorks2000 database got installed during setup? The reports use a database connection string of server=(local).

Wednesday, February 15, 2012

Error running SQL 2005 Performance Dashboard reportDonwload the sample from the site

Donwload the sample from the site

http://www.microsoft.com/downloads/details.aspx?FamilyID=1d3a4a0d-7e0c-4730-8204-e419218c1efc&DisplayLang=en

, follow the inftruction and run the setup.sql script to create requried sp and udf at msdb, SQL server is on WIN2003 and SP2 for sql server 2005.

But I got the following error when running performance_dashboard_main reports and I got the following error

"Difference of two datetime columns caused overflow at runtime"

It looks like the

procedure [MS_PerfDashboard].[usp_Main_GetSessionInfo]

creating error, could you please take a look?

Thanks

The problem occurs on my system if I have a login that has been connected for over 24 days. I "fixed" it by giving up a little precision if the connection is old by changing the query to:

select count(*) as num_sessions,
sum(convert(bigint, s.total_elapsed_time)) as total_elapsed_time,
sum(convert(bigint, s.cpu_time)) as cpu_time,
sum(convert(bigint, s.total_elapsed_time)) - sum(convert(bigint, s.cpu_time)) as wait_time,
sum(convert(bigint, case when datediff(day, login_time, getdate()) < 24
then datediff(ms, login_time, getdate())
else datediff(s, login_time, getdate()) * 1000
end)) - sum(convert(bigint, s.total_elapsed_time)) as idle_connection_time,
case when sum(s.logical_reads) > 0 then (sum(s.logical_reads) - isnull(sum(s.reads), 0)) / convert(float, sum(s.logical_reads))
else NULL
end as cache_hit_ratio
from sys.dm_exec_sessions s
where s.is_user_process = 0x1

You still get millisecond precision if the connection is younger than 24 days but only second precision if older than 24 days. This will support connections that have beem in for about 65 years. That's a long time between rebootsWink

I agree it would be better if they corrected the download, but if you change it in the setup.sql in your local PerformanceDashboard folder it is idempotent and you can redeploy when you see the error on any server.

fwiw: staying connected for 24 days is not a generally recognized best practice for a user SPID.

|||

Hi Bwunder,

Thanks for your tips, I will test it out right away!

By the way, since staying connected for more that 24 days is not good practices, how do you normally handle this if you don't mind.

|||Depends on what you are doing with the connection.

One good place to investigate the answers would be the in the .NET Data Access Architecture Guide
http://msdn2.microsoft.com/en-us/library/ms978510.aspx#daag_managingdatabaseconnections

Error running SQL 2005 Best Practices Analyzer from command line - Object reference not set to a

I'm getting an error trying to run SQL 2005 Best Practices Analyzer from command line. Here's a sample of the command I run...

SqlBPACmd2005.EXE -u WINLOGON mydomain\\administrator P@.ssw0rd -r Limited -c -a

And here's the error I get...

Object reference not set to an instance of an object

I suspect this partially due to the fact that I left off the -sci option, and this appears to be a required parameter; however, I do not know XML and have not been able to find an example of this file anywhere. Could someone give me an example of an XML file formatted for scanning several 2005 instances?

Does my command have other problems?

Thanks!

Yes, you need to use the -sci options. The XML file can be created through the GUI. Run the GUI, choose the items you wish to scan, then choose, "Export to file". Pass this .xml filename in as the parameter to the -sci command line option.

Does this solve your problem?

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server
http://blogs.msdn.com/sqlrem/

Error running rs from command line.

I get this error every time I run the rs command line. I have used several
scripts and even some sample scripts, but still get it.
error BC30456: 'Render' is not a member of
'Microsoft.SqlServer.ReportingServices2005.ReportingService2005'.
results = rs.Render(reportPath, format, _try appending -e mgmt2000 to the end of your command. This should do
it.
- Steve
Shawn wrote:
> I get this error every time I run the rs command line. I have used several
> scripts and even some sample scripts, but still get it.
> error BC30456: 'Render' is not a member of
> 'Microsoft.SqlServer.ReportingServices2005.ReportingService2005'.
> results = rs.Render(reportPath, format, _|||That worked!!!!! Your the man. I see that is for defining the endpoint, why
did I need to do that?
"steve" <stevensherman@.comcast.net> wrote in message
news:1165891632.813381.173660@.16g2000cwy.googlegroups.com...
> try appending -e mgmt2000 to the end of your command. This should do
> it.
> - Steve
> Shawn wrote:
>> I get this error every time I run the rs command line. I have used
>> several
>> scripts and even some sample scripts, but still get it.
>> error BC30456: 'Render' is not a member of
>> 'Microsoft.SqlServer.ReportingServices2005.ReportingService2005'.
>> results = rs.Render(reportPath, format, _
>|||I am not 100% sure. I struggled with that one myself and found the
answer on a forum somewhere. What I understand is that the rs.render
class will not be supported going forward. It is backword compatible
for now, so you are specifying a sqlserver2000 endpoint. In sqlserver
2006 we will both have to find the updated way to do this - but for
now, this works.
- Steve
Shawn wrote:
> That worked!!!!! Your the man. I see that is for defining the endpoint, why
> did I need to do that?
> "steve" <stevensherman@.comcast.net> wrote in message
> news:1165891632.813381.173660@.16g2000cwy.googlegroups.com...
> > try appending -e mgmt2000 to the end of your command. This should do
> > it.
> >
> > - Steve
> >
> > Shawn wrote:
> >> I get this error every time I run the rs command line. I have used
> >> several
> >> scripts and even some sample scripts, but still get it.
> >>
> >> error BC30456: 'Render' is not a member of
> >> 'Microsoft.SqlServer.ReportingServices2005.ReportingService2005'.
> >>
> >> results = rs.Render(reportPath, format, _
> >|||You know, that was my assumption from the error message, but I could not
find the "newer" alternative method. Oh well, it works and probably will
long enough for the lifespan of this report... :)
"steve" <stevensherman@.comcast.net> wrote in message
news:1165979361.656367.325650@.f1g2000cwa.googlegroups.com...
>I am not 100% sure. I struggled with that one myself and found the
> answer on a forum somewhere. What I understand is that the rs.render
> class will not be supported going forward. It is backword compatible
> for now, so you are specifying a sqlserver2000 endpoint. In sqlserver
> 2006 we will both have to find the updated way to do this - but for
> now, this works.
> - Steve
> Shawn wrote:
>> That worked!!!!! Your the man. I see that is for defining the endpoint,
>> why
>> did I need to do that?
>> "steve" <stevensherman@.comcast.net> wrote in message
>> news:1165891632.813381.173660@.16g2000cwy.googlegroups.com...
>> > try appending -e mgmt2000 to the end of your command. This should do
>> > it.
>> >
>> > - Steve
>> >
>> > Shawn wrote:
>> >> I get this error every time I run the rs command line. I have used
>> >> several
>> >> scripts and even some sample scripts, but still get it.
>> >>
>> >> error BC30456: 'Render' is not a member of
>> >> 'Microsoft.SqlServer.ReportingServices2005.ReportingService2005'.
>> >>
>> >> results = rs.Render(reportPath, format, _
>> >
>|||My thoughts exactly!
Shawn wrote:
> You know, that was my assumption from the error message, but I could not
> find the "newer" alternative method. Oh well, it works and probably will
> long enough for the lifespan of this report... :)
> "steve" <stevensherman@.comcast.net> wrote in message
> news:1165979361.656367.325650@.f1g2000cwa.googlegroups.com...
> >I am not 100% sure. I struggled with that one myself and found the
> > answer on a forum somewhere. What I understand is that the rs.render
> > class will not be supported going forward. It is backword compatible
> > for now, so you are specifying a sqlserver2000 endpoint. In sqlserver
> > 2006 we will both have to find the updated way to do this - but for
> > now, this works.
> >
> > - Steve
> >
> > Shawn wrote:
> >> That worked!!!!! Your the man. I see that is for defining the endpoint,
> >> why
> >> did I need to do that?
> >>
> >> "steve" <stevensherman@.comcast.net> wrote in message
> >> news:1165891632.813381.173660@.16g2000cwy.googlegroups.com...
> >> > try appending -e mgmt2000 to the end of your command. This should do
> >> > it.
> >> >
> >> > - Steve
> >> >
> >> > Shawn wrote:
> >> >> I get this error every time I run the rs command line. I have used
> >> >> several
> >> >> scripts and even some sample scripts, but still get it.
> >> >>
> >> >> error BC30456: 'Render' is not a member of
> >> >> 'Microsoft.SqlServer.ReportingServices2005.ReportingService2005'.
> >> >>
> >> >> results = rs.Render(reportPath, format, _
> >> >
> >