Showing posts with label Missed to enable. Show all posts
Showing posts with label Missed to enable. Show all posts

Tuesday, July 21, 2020

Alert on Scheduled SQL Jobs - Missed to enable

During the deployments, windows patching or any other activity, DBAs often disable the jobs to avoid data corruption and jobs failure. Once the activity is completed, DBAs need to re-enable them.

Since it is a manual intervention, it is possible that a job might be left behind from re-enabling. It happened in my case long time ago and since then I have been extra cautious not to repeat the same mistake again. 

I thought to create an alert mechanism that shall help me in identifying if anything is missed. 

Sharing the code below, hoping this will help you as well. 

Steps:

1) Fetch all the active jobs information in a table

2) Compare the information with the current status

3) Unmatched information should be emailed. 

Code: 



Big Data & SQL

Hi Everybody, Please do visit my new blog that has much more information about Big Data and SQL. The site covers big data and almost all the...