January 6, 2011 at 3:29 pm
Hi Guys,
I need your help.
Most of the time my reports subscription fails and i have to resend them.
In case of failure, i set the schedule to run immediately one by one on subscriptions (in report manager page) page and resend them . Once they are done with resending it i put the original schedule back.
But this takes so long as i have to do it for many reports one by one.
I was thinking of doing this throguh script. I tried updating the schedule table thorugh script but it did not work. Schedule did not send the report on new time i updated in schedule.
How can i achive this in one shot through script?
Script should send those reports based on current time and date or few minutes after that.
All other parameters should be same as in the original subscription.
January 10, 2011 at 9:53 am
Hi
If I've understood you correctly you just need to re-run the subscription 'on-demand'. To do this you need to execute a stored proc in the ReportServer database. The stored procedure is called dbo.AddEvent.
e.g ReportServer.dbo.AddEvent @EventType='TimedSubscription', @EventData='<your subscription ID>'
To find the correct subscription ID run the following command:
SELECT s.SubscriptionID FROM dbo.Catalog AS c INNER JOIN dbo.ReportSchedule AS s ON c.ItemID = s.ReportID WHERE c.Name = 'your report name'
You should then be able to construct a T-SQL script to re-run your failed subscriptions
January 10, 2011 at 6:15 pm
Thanks for your reply. I think this will work.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply