You have to migrate a SSRS named instance to a new server in parallel with the existing SSRS Server. Not an uncommon scenario when in production and bringing up a new server, test and validate the new environment, and need to minimize potential downtime. So you bring up the new server, backup the SSRS repository databases, and restore on the new server, assign the current service account to new service, restore the encryption key, and then Report Manager failed on an internal error. You get an error message: “An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database. (rsReportServerDatabaseError) Get Online Help Invalid object name ‘ReportServerTempDB.dbo.TempCatalog‘. Could not use view or function ‘ExtendedCatalog’ because of binding errors”. What happened? When installed, SSRS will actually hardcode the name of the ReportServerTempDB database to stored procedures and functions in the ReportServer database. The version of SSRS being used does not matter. Approximately 72 stored procedures and 2 functions have a hard coded reference embedded internally in SSRS. Not a good feeling when at a client and then had multiple named instances being migrated in each DEV, TEST, and PROD environments.
Here is a query against the metadata view to see the full impact:
select * from INFORMATION_SCHEMA.ROUTINES
where ROUTINE_DEFINITION like ‘%reportservertempdb%’
Here is a code snippet from the stored procedure [dbo].[AddDataSet] :
IF(@EditSessionID is not null)
(ID, ItemID, [Name], LinkID)
(@ID, @ItemID, @Name, @ActualLinkID)
To fix, you have to modify the reference. Script out all the stored procedures and functions from the migrated database with a drop and create, perform a global replace the current to the proper name of the ReportServerTempDB database, and then execute the script. Restart the service and you should be fine.
Vince Napoli is a Data Warehouse and Business Intelligence Architect with over 20 years’ focus on DW/BI and SQL Server. A Mainframe developer since 1987, Vince specializes in MVS technical support, System Testing, Data Warehousing/ Business Intelligence architecture and development, SQL Server DBA/ ETL and database development. He is a Professional Association of SQL Server member and former president of the Philadelphia SQL Server User group.