Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

List long running SQL Agent Jobs

By Neil Bryan,

This script will list long running SQL agent jobs and output the results into a HTML formatted email. I have this set up as a SQL Agent job which runs on every Monday morning against  our major severs. The results are then emailed to me.

To use script a number of local variables will need to be set-up (ie email server info, search window size, duration time, etc.). Please refer to the comments in the code for further details.

Total article views: 1808 | Views in the last 30 days: 5
 
Related Articles
BLOG

Email Pruning

Email consumes a pretty significant chunk for me. Email for my day job, email for my blog, email fro...

FORUM

Update Email Trigger

Email trigger sends two emails

FORUM

looping emails

sending and looping emails

FORUM

Sending email using Send Email Task

Sending email using Send Email Task

Tags
long running    
sql agent    
 
Contribute