tim laqua dot com Thoughts and Code from Tim Laqua


Script for Ad-Hoc SSRS TimedSubscription Scheduling

Quick script to locate and execute SSRS timed subscriptions (useful for testing).

1. Execute the top (uncommented) part and identify which subscription you want to schedule.
2. Paste the SubscriptionId from that row in to the @id variable in the lower section
3. Run the entire lower (commented) section

DECLARE @ReportName VARCHAR(255) = 'Report Name'

      ,CAST(b.Parameters AS XML) AS [Parameters]
      ,CAST(b.ExtensionSettings AS XML) AS [ExtensionSettings]
from ReportServer.dbo.[Catalog] a
      INNER JOIN ReportServer.dbo.[Subscriptions] b
            ON b.Report_OID = a.ItemID
where a.Name = @ReportName

       @id varchar(260) = ''
      ,@Type VARCHAR(32)                  = 'TimedSubscription'

EXEC [ReportServer].dbo.AddEvent @EventType=@Type, @EventData=@id

Tagged as: Leave a comment
Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

No trackbacks yet.