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
Posted Saturday, February 8, 2014 4:33 AM


Group: General Forum Members
Last Login: Tuesday, August 4, 2015 7:12 AM
Points: 16, Visits: 243
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?

Post #1539483
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse