How would I capture output from sql server stored procedure using notification process?
ex. exec stored procedure
capture results and put in email body.
At the bottom of the Notification tab within the Notification object there are report attachment options. It has to be passed the RunID that contains the report(s) you wish to attach.
Are you executing the Stored Procedure from a SQL Job?
If so, the Job Report will have the output from the sproc. If the output is short, you can use the prep_process_report script function to print the output to the notification. Otherwise, you can attach the Job Report to the Notification as an attachment.
I created a sproc that just does a 'select count(*) from oh' and executed it from a SQL job.
Here's what is printed to the Report:
How do attach the job report as attachment to Notification? This is what I am trying to do.
Retrieving data ...