none
How to run a report subscription manually?

    Question

  • I have a report scheduled for email delivery at a certain time of the day. Is there a way I can execute the subscription ON DEMAND so that when ever I execute it, the report is processed and emailed? Is there a way to run the subscription from a batch file/ssis/tsql etc?

     

    any help appreciated.

     

    thanks

    Jacob

    Thursday, March 13, 2008 7:23 AM

Answers

  • Hi Jacob,

     

    I think you can manually fire subscriptions through the SQL Agent jobs. All scheduled subscriptions will have correspnding SQL Agent jobs. You will have to look through the steps in the job and fire that particulr step or maybe even the whole job can be started. Also, I think the job ID will match the Schedule ID. I believe you can also script the SQL Agent jobs through T-SQL. Let me know if this works.

     

    Thanks,

    Gowri

    Thursday, March 13, 2008 8:25 PM

All replies

  • Hi Jacob,

     

    I think you can manually fire subscriptions through the SQL Agent jobs. All scheduled subscriptions will have correspnding SQL Agent jobs. You will have to look through the steps in the job and fire that particulr step or maybe even the whole job can be started. Also, I think the job ID will match the Schedule ID. I believe you can also script the SQL Agent jobs through T-SQL. Let me know if this works.

     

    Thanks,

    Gowri

    Thursday, March 13, 2008 8:25 PM
  • That is correct, you can do this, it is just a pain to figure out which Agent job is the correct one. 

     

    The job step code will have @EventType='TimedSubscription' as a parameter in the T-SQL, which helps to narrow it down, but you might have to look at the schedule to determine if it is the right one.

     

    I am hoping MS puts some sort of readable data in the job description in 2008 like the report name, that would make adminstration of RS jobs a lot easier.

     

    Thursday, March 13, 2008 9:30 PM
  • Thanks Gowri, Shawn,

    I will give it a try.

    Sunday, March 16, 2008 11:08 AM