Click here to monitor SSC
SQLServerCentral is supported by Redgate
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: Sunday, January 10, 2016 6:19 AM
Points: 16, Visits: 247
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