Last successful run of Data Driven Subscription

Hi, 

I have a Data Driven Subscription which runs every day for the previous day. If for any reason the report subscription fails, i would like to get the last time it ran successfully. I know in the subscription table we have lastRunTime, but it will show the recent one which failed but i would like to know when it ran successfully last. 

Example:

Saturday 5:00 AM - Ran Successfully

Sunday   5:00 AM - Ran Successfully

Monday   5:00 AM - Ran successfully

Tuesday  5:00 AM - Failed

LastRunTime column will have Tuesday 5:00 AM. 

Is there a way to get Monday 5:00 AM which is the last ran successfully ?? 

How can i get the history of a subscription??


  • Edited by kcmania 11 hours 38 minutes ago addition
August 26th, 2015 2:54pm

.. the ExecutionLog3 view should have this...

https://msdn.microsoft.com/en-us/library/ms159110(v=sql.120).aspx
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 3:46pm

No i think it has details about the report execution but not the report subscription. The report might execute successfully but the subscription might fail and that will not show up in the execution log table... as far as i know. 

Please correct me if i am wrong. 

August 26th, 2015 4:42pm

Looking at my ExecutionLog3 view i can see under the "RequestType" column, "Subscription".  Under the the "Status" column I can see all kinds of status's:

- rsInternalError
- rsHttpRuntimeClientDisconnectionError
- rsProcessingAborted
- rsSuccess
- rrRenderingError
- rsHttpRuntimeInternalError

It should cover your needs.  Take a look at yours in relation to the time period in which you had an issue.  It should be there.  It would be interesting if Data Driven Subscriptions didn't show up.

Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 5:00pm

Hi kcmania,

Check this

SELECT * FROM [ReportServer].[dbo].[Subscriptions]

August 26th, 2015 9:54pm

Hi Kcmania, 

According to your description, you want to get every subscription status, right? 

In Reporting Services, when executing a subscription, a new record will be updated to the ExecutionLog3 table. If your scenario, if you want to get the required subscription status, you can query the ExecutionLog3 table based on your requirement. Please refer to the following query syntax: 

Select * from [ReportServer].[dbo].[ExecutionLog3] where RequestType = 'Subscription' and Status = 'rsSuccess' and TimeStart > '2015-08-24'

The result is like below: 

If you have any other question, please feel free to ask.

Regards,
Shrek Li

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 3:23am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics