April 8, 2017 at 11:51 am
Hi all,
I am creating a simple job that does the following
1) create a table xxx that record the current jobs and their created time + modified time.
2) everyday, it will compare this table with the actual sysjob table matching the job with its created and modified time
3) if there is a difference, send email alert.
Just wondering, if it is okay this table xxx to be created in the master or msdb database ? what would be the good practise on the location of such table ?
Regards,
Noob
April 8, 2017 at 6:55 pm
A better practice would be to create a small "utility" database for such things.
To be honest, though... you don't need a separate table to do comparisons with. Jobs have both a created date and a modified date. For you daily check, just have the proc check for either of those dates changing in the last 24 hours and have a "morning report" job send you an email with a list of jobs that have a created or modified date within the last 24 hours.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 9, 2017 at 5:45 am
I also use "utility" databases for such purposes. You'd better go with such one, but if you insist on master or msdb, then look to keep it small and simple.
Igor Micev,My blog: www.igormicev.com
April 16, 2017 at 10:37 am
Jeff Moden - Saturday, April 8, 2017 6:55 PMA better practice would be to create a small "utility" database for such things.To be honest, though... you don't need a separate table to do comparisons with. Jobs have both a created date and a modified date. For you daily check, just have the proc check for either of those dates changing in the last 24 hours and have a "morning report" job send you an email with a list of jobs that have a created or modified date within the last 24 hours.
Hi Jeff,
So sorry. I totally read and miss out to reply! Yeap, i dont know what came over me to miss the part whereby i can actually just compare the created/modified date to see if there are any change within the past x period.
Thank you!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply