Is is possible to get the history of SSRS subscription? I can able to find the status of the last subscription details and execution details for the report. I want to know if there is any possible to get the subscription wise execution log details.
Is is possible to get the history of SSRS subscription? I can able to find the status of the last subscription details and execution details for the report. I want to know if there is any possible to get the subscription wise execution log details.
Just a pointer in the right direction, you can use the ExexcutionLogs in the ReportServer DB
SELECT * FROM ReportServer.dbo.ExecutionLog3 WHERE RequestType = 'Subscription'
There's ExecutionLog, ExecutionLog2 and ExecutionLog3
Have a look through the columns in those views and you should be able to get all the information that you need
I'm not sure I totally understand, but maybe this will get you in the ball park.
;WITH BaseData AS ( -- Convert the ExtensionSettings column to XML so that we can work with it. SELECT s.SubscriptionID, c.Name AS ReportName, c.Path AS ReportPath, CONVERT (XML, s.ExtensionSettings) AS ExtensionXML, c.Hidden FROM ReportServer.dbo.Subscriptions AS s INNER JOIN ReportServer.dbo.Catalog AS c ON c.ItemID = s.Report_OID), ShreddedData AS ( -- Shred the XML data to get at what we want. SELECT BaseData.SubscriptionID, BaseData.ReportName, BaseData.ReportPath, COALESCE (Extensions.value ('(./*:Name/text())[1]', 'nvarchar(3000)'), 'Value') AS SettingName, Extensions.value ('(./*:Value/text())[1]', 'nvarchar(max)') AS SettingValue, BaseData.Hidden FROM BaseData CROSS APPLY BaseData.ExtensionXML.nodes ('//*:ParameterValue') AS Query(Extensions) ) SELECT * FROM ShreddedData WHERE SettingName IN ( 'TO', 'CC', 'BCC' );
Note that there are different settings, remove the final WHERE clause to see them all and then you can select whatever you want to. Not all columns are included, play around with it to get what you want. You can always join to the execution logs if you need to.
Hope that helps.
18 People are following this question.