Hello,
Can anyone help me how to monitor and send notifications for long running jobs or the jobs which has hanged in the middle. sysjobhistory tbl gives detail about success or failure of the job.
Any help is appreciated
Thanks
Sejal
Printable View
Hello,
Can anyone help me how to monitor and send notifications for long running jobs or the jobs which has hanged in the middle. sysjobhistory tbl gives detail about success or failure of the job.
Any help is appreciated
Thanks
Sejal
Hello,
found a script at sqlservercentral.com.
Not sure if this is the solution you need.
Try this link:
Find Longstanding Open Transactions
Brgds...MipMip
1. create a table in MSDB like below
JobName Start ExpTime started Ended
x 10:00AM 15
y 11:00pm 70
2.In the job
1st step. update the started with true and ended with NULL
2nd step. real job step
3rd step. update the ended with True
3. create another job which runs every 5 mins which can check this table and compare the getdate() and startime+expectedtime and started.
This job can send message if it is running for a long time
HAPPY DIWALI
Thanks A Lot
Sejal