Showing posts with label discovered. Show all posts
Showing posts with label discovered. Show all posts

Friday, March 9, 2012

Good Book on SQL Server Reporting Services Script

Hello, I recently discovered the rs.exe utility and .rss files. I have
looked at and enjoyed the sample scripts, but was wondering if there were any
books on this subject that anyone has found useful?
Thanks in advance!
TimTim,
That is a hard one, as all of the books out there do not talk much to the
rs.exe utility, but there is one site www.sqldbatips.com has a tool that can
help out a ton: Reporting Services Scripter.
I also have a method to debug rss scripts.
In Visual Studio
1. Create a new Visual Basic Console Application Project: name it RSDebug
2. In the Soultion Explorer window - right click on the RSDebug Project and
select the Add Web Reference option.
3. In the URL text box add:
http://servername/reportserver/reportservice2005.asmx
4. Click Go Command Button (This step takes a while)
5. In the Web Reference Name text box add SSRSWebService
6. Click Add Reference Command Button
7. In the Code Window above the Module Module1 add:
Imports RSDebug.SSRSWebService
Imports System.Web.Services.Protocols
8. Below the Module Module1 add: Public rs As New ReportingService2005
9. Paste your script code in the Sub Main() procedure
10. Set your breakpoint and go.
Example: (In this example System.IO is needed due to the use of the
MemoryStream object)
Imports RSDebug.SSRSWebService
Imports System.Web.Services.Protocols
Imports System.IO ' This was added because MemoryStream was used
Module Module1
Public rs As New ReportingService2005
Sub Main()
Dim strObjectName As String = "Report Name"
Dim strObjectPath As String = "/Application"
Dim strObjectFullPath As String = strObjectPath & "/" & strObjectName
Dim strLocalFile As String = "Report Name.rdl"
Dim strLocalPath As String = "C:\"
Dim strLocalFullPath As String = strLocalPath & strLocalFile
Dim objReportDefinition As Byte()
Dim objMemoryStream As MemoryStream
Dim objDocument As New System.Xml.XmlDocument()
Try
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
objReportDefinition = rs.GetReportDefinition(strObjectFullPath)
objMemoryStream = New MemoryStream(objReportDefinition)
objDocument.Load(objMemoryStream)
objDocument.Save(strLocalFullPath)
Console.WriteLine("Standard: Report downloaded successfully.")
Catch e As SoapException
Console.WriteLine("Error: " +
e.Detail.Item("ErrorCode").InnerText + " (" +
e.Detail.Item("Message").InnerText + ")")
End Try
End Sub
End Module|||Thanks very much Reeves, this is great information.
Tim
"Reeves Smith" wrote:
> Tim,
> That is a hard one, as all of the books out there do not talk much to the
> rs.exe utility, but there is one site www.sqldbatips.com has a tool that can
> help out a ton: Reporting Services Scripter.
> I also have a method to debug rss scripts.
> In Visual Studio
> 1. Create a new Visual Basic Console Application Project: name it RSDebug
> 2. In the Soultion Explorer window - right click on the RSDebug Project and
> select the Add Web Reference option.
> 3. In the URL text box add:
> http://servername/reportserver/reportservice2005.asmx
> 4. Click Go Command Button (This step takes a while)
> 5. In the Web Reference Name text box add SSRSWebService
> 6. Click Add Reference Command Button
> 7. In the Code Window above the Module Module1 add:
> Imports RSDebug.SSRSWebService
> Imports System.Web.Services.Protocols
> 8. Below the Module Module1 add: Public rs As New ReportingService2005
> 9. Paste your script code in the Sub Main() procedure
> 10. Set your breakpoint and go.
>
> Example: (In this example System.IO is needed due to the use of the
> MemoryStream object)
>
> Imports RSDebug.SSRSWebService
> Imports System.Web.Services.Protocols
>
> Imports System.IO ' This was added because MemoryStream was used
>
> Module Module1
> Public rs As New ReportingService2005
>
> Sub Main()
> Dim strObjectName As String = "Report Name"
> Dim strObjectPath As String = "/Application"
> Dim strObjectFullPath As String = strObjectPath & "/" & strObjectName
> Dim strLocalFile As String = "Report Name.rdl"
> Dim strLocalPath As String = "C:\"
> Dim strLocalFullPath As String = strLocalPath & strLocalFile
> Dim objReportDefinition As Byte()
> Dim objMemoryStream As MemoryStream
> Dim objDocument As New System.Xml.XmlDocument()
>
> Try
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> objReportDefinition = rs.GetReportDefinition(strObjectFullPath)
> objMemoryStream = New MemoryStream(objReportDefinition)
> objDocument.Load(objMemoryStream)
> objDocument.Save(strLocalFullPath)
> Console.WriteLine("Standard: Report downloaded successfully.")
> Catch e As SoapException
> Console.WriteLine("Error: " +
> e.Detail.Item("ErrorCode").InnerText + " (" +
> e.Detail.Item("Message").InnerText + ")")
> End Try
> End Sub
> End Module|||On Aug 7, 7:58 pm, TimS <timsts...@.msn.com(donotspam)> wrote:
> Thanks very much Reeves, this is great information.
> Tim
> "Reeves Smith" wrote:
> > Tim,
> > That is a hard one, as all of the books out there do not talk much to the
> > rs.exe utility, but there is one sitewww.sqldbatips.comhas a tool that can
> > help out a ton: Reporting Services Scripter.
> > I also have a method to debug rss scripts.
> > In Visual Studio
> > 1. Create a new Visual Basic Console Application Project: name it RSDebug
> > 2. In the Soultion Explorer window - right click on the RSDebug Project and
> > select the Add Web Reference option.
> > 3. In the URL text box add:
> >http://servername/reportserver/reportservice2005.asmx
> > 4. Click Go Command Button (This step takes a while)
> > 5. In the Web Reference Name text box add SSRSWebService
> > 6. Click Add Reference Command Button
> > 7. In the Code Window above the Module Module1 add:
> > Imports RSDebug.SSRSWebService
> > Imports System.Web.Services.Protocols
> > 8. Below the Module Module1 add: Public rs As New ReportingService2005
> > 9. Paste your script code in the Sub Main() procedure
> > 10. Set your breakpoint and go.
> > Example: (In this example System.IO is needed due to the use of the
> > MemoryStream object)
> > Imports RSDebug.SSRSWebService
> > Imports System.Web.Services.Protocols
> > Imports System.IO ' This was added because MemoryStream was used
> > Module Module1
> > Public rs As New ReportingService2005
> > Sub Main()
> > Dim strObjectName As String = "Report Name"
> > Dim strObjectPath As String = "/Application"
> > Dim strObjectFullPath As String = strObjectPath & "/" & strObjectName
> > Dim strLocalFile As String = "Report Name.rdl"
> > Dim strLocalPath As String = "C:\"
> > Dim strLocalFullPath As String = strLocalPath & strLocalFile
> > Dim objReportDefinition As Byte()
> > Dim objMemoryStream As MemoryStream
> > Dim objDocument As New System.Xml.XmlDocument()
> > Try
> > rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> > objReportDefinition = rs.GetReportDefinition(strObjectFullPath)
> > objMemoryStream = New MemoryStream(objReportDefinition)
> > objDocument.Load(objMemoryStream)
> > objDocument.Save(strLocalFullPath)
> > Console.WriteLine("Standard: Report downloaded successfully.")
> > Catch e As SoapException
> > Console.WriteLine("Error: " +
> > e.Detail.Item("ErrorCode").InnerText + " (" +
> > e.Detail.Item("Message").InnerText + ")")
> > End Try
> > End Sub
> > End Module
I ordered Microsoft's new books for the MCITP certification program in
Business Intelligence. One covers the 70-445 exam and the other one
the 70-446 exam. I'm sure you'll find them very useful (once they're
published anyways!).
http://www.amazon.com/MCTS-Self-Paced-Training-Exam-70-445/dp/0735623414/ref=pd_bbs_1/102-9922975-8902553?ie=UTF8&s=books&qid=1186575878&sr=8-1
http://www.amazon.com/MCITP-Self-Paced-Training-Exam-70-446/dp/0735623848/ref=pd_bbs_2/102-9922975-8902553?ie=UTF8&s=books&qid=1186575878&sr=8-2

Wednesday, March 7, 2012

Going From SQL Server 2000 to 2005

It's been nightmarish and I need help fast!

Customers now have to buy 2005 and we've discovered that the migration isn't smooth.

I copied a 2005 and attached to it in 2005. Running under Windows XP Professional, I tried to run our application written in ColdFusion.

We discovered that a query fell over (seemingly) having to do with bit datatypes Error: 'Unspecified error occurred on SQL Server. Connection may have been terminated by the server.'), NULLs, or something. A programmer got around it, as a test, by converting all the bit fields in the table to int, which we naturally can't do as a real world solution.

I think upgrading the OS, including the ODBC driver SQL uses, applying Service Pack 1 as well as the B 9.0.2153 hot fixes, fixed that problem.

However a subsequent insert went from breaking with the above error message to break with "Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services." - that error refers to a fix for UNION which the query doesn't contain.

Lastly, when I went away from break, came back, and refreshed, I got the following error,"Cannot generate SSPI context". The application does have a timeout which previously under SQL 2000 would simply take them back to the login page. Nothing sort of rebooting my laptop allowed me back into the application.

This issues, and others no doubt lurking, strike me as something major and likely to affect a lot of people, but I have found nothing on the net about them.

I have run everything about compatibility I could find. Is it that few people are running SQL 2005 on dbs created in 2000?

As far as I'm concerned, SQL 2005 is NOT ready for primetime.

Any solutions or ideas?

Thank you.

Dan Keefer
Have you ever checked your database for physical consistency by DBCC CHECKDB? I received such message when my database had got corrupted (but it was MSSQL 2000).|||This db started out in 2000 and was restored under a new name and then attached in 2005. I just did run CHECKDB with no errors.

Dan