简体   繁体   中英

SSRS - Renamed TempDB and now Subscription Reports not Emailing

I'm currently unable to email out time based subscription reports from SSRS on a new SQL Server 2012 installation on Server 2012.

I receive the following error in the SSRS LogFiles

schedule!WindowsService_5!dc4!10/14/2013-10:01:09:: i INFO: Handling Event TimedSubscription with data 1a762da1-75ab-4c46-b989-471185553304. library!WindowsService_5!dc4!10/14/2013-10:01:09:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: , An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database.; library!WindowsService_5!dc4!10/14/2013-10:01:09:: w WARN: Transaction rollback was not executed connection is invalid schedule!WindowsService_5!dc4!10/14/2013-10:01:09:: i INFO: Error processing event 'TimedSubscription', data = 1a762da1-75ab-4c46-b989-471185553304, error = Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database. ---> System.Data.SqlClient.SqlException: Invalid object name 'ReportServerTempDB.dbo.ExecutionCache'.

Databases were migrated from SQL 2008, this was done by a third party and I'm unsure if something was overlooked.

Any assistance would be greatly appreciated.

Thank you.

Dane

This thread seems to address your issue.

http://www.sqlservercentral.com/Forums/Topic553765-147-1.aspx

Please do a modicum of research before posting error messages.

From the Link " After much consternation, I have found a trigger referencing the invalid object. Trigger [Schedule_UpdateExpiration] on ReportServer table Schedule has the offending reference in it. In test, I altered this trigger to reference the correct report server tempdb and now subscriptions appear to be working properly. So far I have found nothing else broken."

AND

"If anyone is looking for a quick answer then here is what I did to solve my problem:

  • Updated trigger on dbo.schedule to reference the correct tempdb.
  • Scripted all stored procedures with their permissions onto a new query then "find and replaced" all instances of the old tempdb with the new one. "

After a while searching for a solution to fix this issue, I found that this is caused by the jobs definition of SQL Server Agent was not fully migrated to the new service. For every subscription created in SSRS, there is an associated job defined in SQL Server Agent. For services reply heavily on report delivery via subscriptions, it's best to export those jobs definition and import them into the new server.

Daniel E. answer is Correct.

I have spend a lot of time to find it and the error I am getting while updating the existing subscriptions

“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)”

when i search online with the above error, i couldn't manage to fix it. after a long time i found the tigger is pointing to old database. Temp database in the below: [ReportServerTempDB] after updating to correct tempDB all started working fine.

ALTER TRIGGER [dbo].[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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM