Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

sp_send_dbmail - Job Runtime Expand / Collapse
Author
Message
Posted Saturday, February 8, 2014 4:33 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, July 21, 2014 7:19 AM
Points: 8, Visits: 163
I have two steps in each of my SQL Agent jobs - one called if a job step fails, another if it succeeds.
Each step utilizes sp_send_dbmail to send an email notification.

On the successful completion step, I would like to include the job's total run-time in the body of the email sent.

How can I determine total run-time (or more accurately current run-time) for the job and send via sp_send_dbmail in the body of the email?

Thanks.
Post #1539483
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse