Microsoft has always been pretty good at one thing, ease on install.
One of the things I always says is the greatest thing about SQL Server is any idiot can install it. The other thing I also say is the worst thing about SQL Server is any idiot can install it.
This has carried over to the other fine products that ship with SQL Server. The one thing I’ve had pretty good luck using as a novice since it was introduced is SQL Server Reporting Services. As someone who hasn’t had the best experience over the years with crystal reports SSRS was a breath of fresh air.
One of the things I’ve never had to do though is move SSRS to a new server. To start with I did what I always do; I went to MSDN and read what I could find on moving or migrating to a new server. I was feeling pretty confident that I could pull this off.
I had backed up my databases and my key so I could import it on reinstall.
My first mistake was hubris that I could do what I thought was correct and second guess the documentation.
I installed SQL Server plus all the other services, including SSRS just like I was doing a clean install. The server didn’t start out with the same name and that was part of the problem. I copied all the files I needed from the old server and shut it down. Next we renamed the server and I renamed the SQL Server instance to its new name. Once that was done I restored the old SSRS databases and the encryption key. I fired up SSRS when to look at a report and got an odd error.
This version doesn’t support multiple instances.
My second mistake was assuming the documentation on MSDN was complete. After staring over and following the instructions there I ended up variations on the previous error, or the reports wouldn’t generate period.
What should have been a two hour migration was stretching into two days. I had to pull the trigger and bring the old hardware back on line.
Having a fall back plan saved us from having any impact on the business but it did set me back a week until the next available maintenance window was available.
I now had a whole week to research the issue and make sure I had a successful migration, so I got cracking.
I went to my buddy Mr. Google and asked him where the hell I messed up and if anyone else had come up against this. As I thought I wasn’t the first, but there was a twist it wasn’t just one thing it was a few things that I was bumping up against. Luckily between MSDN and some of the fine folks on the SQLServerCentral forums I was able to piece together a successful migration strategy.
The list of obstacles I had to overcome.
This was a named instance and the $ played havoc with the Reporting Services Configuration Manager. This was a migration of existing data plus the security key to the server. The server name was also being changed after install to reflect the old server name. The instructions from MSDN tell you not to choose SSRS to be configured during the install with the default values. This causes a key part not to be configured, IIS. This is a problem because without IIS configured you can’t view the reports! This by its self isn’t an issue if you are working with a default instance of SQL Server. But, as I indicated, I’m dealing with a named instance. After you have installed SQL Server and SSRS you are suppose to use the Reporting Services Configuration Manager to setup IIS. But, since the named instance has the $ in it, the Reporting Services Configuration Manager kicks back the virtual name with:
ReportServicesConfigUI.WMIProvider.WMIProviderException: The virtual directory specified is not valid. Make sure the specified name is not too long and doesn't contain illegal characters. (example: ;) at ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.CreateVirtualDirectory(String virtualDirectory, String path)
Very nice, if you let the installer configure the site at install time it gladly puts the $ in the name for you like http://<servername>/ReportServer$<instancename>.
I had puzzled out the IIS part and gleaned the rest from Tim Benninghoff and his post on SSC. Also, the bits about restoring the encryption key came from MSDN, none of the other articles talk about a named instance at all and assume it is a default instance you are moving.
So, I followed these steps to restore the IIS folder structure and move my instance of SSRS to the new server. Remember, please validate any changes you make to your server, and always your success isn’t guaranteed just because you followed these instructions.
On the original source server:
On your new destination server:
--create RSExecRole role in master and assign permissions USE [master] GO CREATE ROLE [RSExecRole] AUTHORIZATION [dbo] GO GRANT EXECUTE ON master.dbo.xp_sqlagent_notify TO RSExecRole GO GRANT EXECUTE ON master.dbo.xp_sqlagent_enum_jobs TO RSExecRole GO GRANT EXECUTE ON master.dbo.xp_sqlagent_is_starting TO RSExecRole GO --create RSExecRole role in msdb and assign permissions USE [msdb] GO CREATE ROLE [RSExecRole] AUTHORIZATION [dbo] GO -- Permissions for SQL Agent SP's GRANT EXECUTE ON msdb.dbo.sp_help_category TO RSExecRole GO GRANT EXECUTE ON msdb.dbo.sp_add_category TO RSExecRole GO GRANT EXECUTE ON msdb.dbo.sp_add_job TO RSExecRole GO GRANT EXECUTE ON msdb.dbo.sp_add_jobserver TO RSExecRole GO GRANT EXECUTE ON msdb.dbo.sp_add_jobstep TO RSExecRole GO GRANT EXECUTE ON msdb.dbo.sp_add_jobschedule TO RSExecRole GO GRANT EXECUTE ON msdb.dbo.sp_help_job TO RSExecRole GO GRANT EXECUTE ON msdb.dbo.sp_delete_job TO RSExecRole GO GRANT EXECUTE ON msdb.dbo.sp_help_jobschedule TO RSExecRole GO GRANT EXECUTE ON msdb.dbo.sp_verify_job_identifiers TO RSExecRole GO GRANT SELECT ON msdb.dbo.sysjobs TO RSExecRole GO GRANT SELECT ON msdb.dbo.syscategories TO RSExecRole GO -- SQL Server 2005 requires that the user is in the SQLAgentOperatorRole IF EXISTS (SELECT * FROM sysusers WHERE issqlrole = 1 AND name = N'SQLAgentOperatorRole') BEGIN EXEC msdb.dbo.sp_addrolemember N'SQLAgentOperatorRole', N'RSExecRole' END GO
Once all that is done, if you had an instance already configured you may need to remove the virtual folders from the default website.
I also restarted everything again and tested it all out.
Good luck and I hope you find this useful; trying to glean all of this from different resources and separate what was really going on by the cryptic messages SSRS pumps out can be difficult in the best of times!
You are very true that, Microsoft is not good in documenting his all information in MSDN site. I think they do with purposely becuase of support income.
We hit a wall when we are configuring the SSRS 2008 with SharePoint 2007. nightmare.. finally we used a support person and he said something which they never documented on their site.
I think they need to change this habit..
Thanks for your nice article.. will try
regards,
Mit
This is what i used last time when i move ssrs from one server to another, it provides some good functions to finsih the job pretty easily.
www.sqldbatips.com/showarticle.asp
Nice! I didn't see that tool floating around at all during my panic searches of the internet. bookmarked!
serendipity you should post this and thanks for doing so. This looks like a nightmare! We are implementing SRDF, two servers built identically, database engine, SSIS,SSAS and SSRS. All disks replicated except OS drive. SRDF failed over, server renamed to that of live server. All works except SSRS, cannot connect to SSRS, file permissions and decryption errors! Any tips?