Bharat Guru
asked on
SQL to find list of subscriptions for CSV reports.
Looking for SQL to find list of subscriptions for SSRS reports exporting as csv formate.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi Bharat,
Please use below. Its the modified version from microsoft.-
https://gallery.technet.microsoft.com/scriptcenter/List-all-SSRS-subscriptions-968ae4d5
Hope it helps!
Please use below. Its the modified version from microsoft.-
USE [ReportServer];
GO
SELECT
CAT.Name ReportName
,USR.UserName AS SubscriptionOwner
,SUB.ModifiedDate
,SUB.[Description]
,SUB.EventType
,SUB.DeliveryExtension
,SUB.LastStatus
,SUB.LastRunTime
,SCH.NextRunTime
,SCH.Name AS ScheduleName
,CAT.[Path] AS ReportPath
,CAT.[Description] AS ReportDescription
FROM dbo.Subscriptions AS SUB
INNER JOIN dbo.Users AS USR
ON SUB.OwnerID = USR.UserID
INNER JOIN dbo.[Catalog] AS CAT
ON SUB.Report_OID = CAT.ItemID
INNER JOIN dbo.ReportSchedule AS RS
ON SUB.Report_OID = RS.ReportID
AND SUB.SubscriptionID = RS.SubscriptionID
INNER JOIN dbo.Schedule AS SCH
ON RS.ScheduleID = SCH.ScheduleID
WHERE SUB.DeliveryExtension LIKE '%CSV%' OR SUB.ExtensionSettings LIKE '%CSV%'
ORDER BY USR.UserName
,CAT.[Path];
https://gallery.technet.microsoft.com/scriptcenter/List-all-SSRS-subscriptions-968ae4d5
Hope it helps!
Hi,
Have you tried my last option?
Have you tried my last option?
ASKER
thanks
ASKER