Wednesday, March 7, 2012

error with scale-out web server: Invalid object name

We are adding a second web server to our farm. Reporting Services is installed on one web server as Rpt01 instance and works just fine. We have installed the second web server also with an instance named Rpt01 and are now trying to configure to re-use the same database as the first server. When we restart services we get the error listed below.

I was wondering if there was an issue with the same named instances on two different web servers accessing the same ReportServer01 database? This is the error that we are getting. Any help would be appreciated. The curious thing is that our databases are named ReportServer01 and ReportServer01TempDB and not the name listed below.

ReportingServicesService!schedule!4!1/23/2007-15:40:20:: Unhandled exception caught in Scheduling maintenance thread: System.Data.SqlClient.SqlException: Invalid object name 'ReportServerTempDB.dbo.ExecutionCache'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.ReportingServices.Library.InstrumentedSqlCommand.ExecuteNonQuery()
at Microsoft.ReportingServices.Library.SchedulePollWorker.ClearConsistancyFlag()
at Microsoft.ReportingServices.Library.SchedulePollWorker.CheckScheduleConsistancy(Object state)

Same Named instances should work fine. Check in the RSConfigTool for each instance in the webfarm , they are connected to ReportServer01 database and they are properly initialized. Was the second instance immediately joined in the farm or it operated as a standalone RS Server where some schedules were created?|||

Thanks for the response. The first instance may have had some schedules created but the second one was installed and configured immediately. I have uninstalled the second instance and reinstalled but am getting exact same issue. I used a different instance name this time, Rpt02, just so I could see reference differences.

Also when I uninstalled the second web server instance, it was never removed from the initialized list of the farm. I try to manually remove it using the Config tool and it gives an unknown error has occurred message. After reinstalling the second instance I am able to successfully add it to the initialized list. Still a little worried that an instance that no longer exists still appears in the list...

|||The uninstalled instance appearing in the initialization list should not be any problem. Are the schedules firing correctly now?|||No. Strangest thing... We can't get any subscriptions to work on this installation. We can create subscriptions and I see that the sql agent runs the scheduled job but then nothing else happens. No errors are logged and no mail arrives.|||I am now being told that if you rename your ReportServer database (which I did) and then set configuration to this database that this error could occur. I'm looking for the correct steps for renaming your ReportServer database. If anyone has them could you share? I will probably go back to the old name since it sounds like I am stuck with that name.|||

The problem has been fixed. I found one trigger in the ReportServer01 database that was referencing the old ReportServerTempDB database. I corrected the name and all is good now.

I'm told that we shouldn't change our database name after the ReportServer database has been created so I will follow that for future. Here's the trigger that I had to change.

CREATE TRIGGER [Schedule_UpdateExpiration] ON [dbo].[Schedule]
AFTER UPDATE
AS
UPDATE
EC
SET
AbsoluteExpiration = I.NextRunTime
FROM
[ReportServerTempDB].dbo.ExecutionCache AS EC
INNER JOIN ReportSchedule AS RS ON EC.ReportID = RS.ReportID
INNER JOIN inserted AS I ON RS.ScheduleID = I.ScheduleID AND RS.ReportAction = 3

GO

No comments:

Post a Comment