none
AddEvent Procedure informations

    Question

  • Hi everybody,

    On one project, we use subscriptions for many reports without timed schedule tasks. 

    All subscriptions are started with AddEvent Procedure:

    EXEC ReportServer.dbo.AddEvent @EventType='TimedSubscription', @EventData='805cd511-cccc-bbbb-aaaa-3746daff3b95'

    We can't found documentation about the usage of this procedure and how Report Server  executes subscriptions.

    - Are there enqueued? (If yes, how to configure it? And how to respect the enqueuing?)
    - How reports are Parallelized?
    - What's about the usage of "AddEvent" Procedure? 
    - Is that possible to configure a time out on subscriptions?

    Thanks very much for your help,
    Arnaud
    Monday, April 28, 2014 1:31 PM

Answers

  • Hi Arnaud,

    If I understand correctly, you want to know the detail information about subscription execute procedure, right?  In this case, here is blog which describe the detail information about it.

    When you create a subscription several things are added to the RS server:

    • A row is placed in the Subscriptions table identifying the name of the report, along with parameter settings, data driven query info and so on to process the subscription
    • A row is placed in the Schedule and ReportSchedule tables with the timing of the subscription
    • A SQL Server Agent job is created to control the scheduled execution of the report, and this is stored in the sysjobs and sysjobsteps of the MSDB database.

    When the subscription runs several things happen:

    • The SQL Server Agent job fires and puts a row in the Event table in the RS catalog with the settings necessary to process the subscription
    • The RS server service has a limited number of threads (2 per CPU) that poll the Event table every few seconds looking for subscriptions to process
    • When it finds an event, it puts a row in the Notifications table and starts processing the subscription, which includes executing the data driven subscription query (if present), processing the report, rendering it to the specified format (HTML, PDF, Excel etc), and delivering the final result to either an email address or a file share.

    Reference:
    Monitoring and Troubleshooting Subscriptions
    Troubleshooting Subscriptions: Part II, Using the Reporting Services Trace Log File

    Hope this helps.

    Regards,


    Charlie Liao
    TechNet Community Support

    Wednesday, April 30, 2014 8:54 AM
    Moderator

All replies

  • Hi Arnaud,

    If I understand correctly, you want to know the detail information about subscription execute procedure, right?  In this case, here is blog which describe the detail information about it.

    When you create a subscription several things are added to the RS server:

    • A row is placed in the Subscriptions table identifying the name of the report, along with parameter settings, data driven query info and so on to process the subscription
    • A row is placed in the Schedule and ReportSchedule tables with the timing of the subscription
    • A SQL Server Agent job is created to control the scheduled execution of the report, and this is stored in the sysjobs and sysjobsteps of the MSDB database.

    When the subscription runs several things happen:

    • The SQL Server Agent job fires and puts a row in the Event table in the RS catalog with the settings necessary to process the subscription
    • The RS server service has a limited number of threads (2 per CPU) that poll the Event table every few seconds looking for subscriptions to process
    • When it finds an event, it puts a row in the Notifications table and starts processing the subscription, which includes executing the data driven subscription query (if present), processing the report, rendering it to the specified format (HTML, PDF, Excel etc), and delivering the final result to either an email address or a file share.

    Reference:
    Monitoring and Troubleshooting Subscriptions
    Troubleshooting Subscriptions: Part II, Using the Reporting Services Trace Log File

    Hope this helps.

    Regards,


    Charlie Liao
    TechNet Community Support

    Wednesday, April 30, 2014 8:54 AM
    Moderator
  • Hi Charlie,
    this link helped me to understand how to subscriptions are executed.

    Unfortunately, I think that Report Server don't respect the entry order.

    Thanks very much for your help,
    Arnaud
    Tuesday, May 06, 2014 3:47 PM