Friday, March 30, 2012

Invoking SQL Server JOB created for a report schedule

Hi,
Instead of runing a report through the schedule that I have created, I am invoking the SQL Agent Job that has been created for the schedule of the report, using the system stored procedure sp_startjob. Is this a recommended approach? Are there drawbacks for this approach?
Subash

This is a perfectly reasonable solution. If you are just trying to fire a subscription you could also use the FireEvent method to invoke the subscription.

The only drawback is that this is not a supported scenario, which means the job could change in a SP or new release, however this seems unlikely.

No comments:

Post a Comment