Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Who modified the JOB? Expand / Collapse
Author
Message
Posted Monday, February 24, 2014 3:36 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 10:49 PM
Points: 138, Visits: 389
Hi there,

I own a job, that was rescheduled by some one. I want to track from which user the schedule got changed ?

Do I have query for the above???

Thanks in advance
Post #1544407
Posted Monday, February 24, 2014 4:19 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:43 PM
Points: 43,047, Visits: 36,206
Unless you had some custom auditing implemented before that change was made, no way to tell.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1544431
Posted Monday, February 24, 2014 4:48 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 10:49 PM
Points: 138, Visits: 389
GilaMonster (2/24/2014)
Unless you had some custom auditing implemented before that change was made, no way to tell.


Could you assist me to create custom audit ?
Post #1544442
Posted Monday, February 24, 2014 5:14 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:43 PM
Points: 43,047, Visits: 36,206
'Custom audit' can be as simple as logging information you want to keep for as long as you want to keep it. Start by figuring out what you want to audit and how long, then create a database to store the information, then create jobs to record that information.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1544449
Posted Monday, February 24, 2014 7:30 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 9:32 PM
Points: 21,755, Visits: 15,459
Here's an option that can be used. You will need to determine what you want to audit in msdb for the jobs, but this can get you going in the right direction.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1544519
Posted Monday, February 24, 2014 11:11 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 10:38 PM
Points: 3,931, Visits: 7,160
This may not be a route you want to take, but we experienced a similar problem while a server was being used for both DEV/PRODUCTION. I created a trigger on the sysjobs table to email me whenever a job was edited/disabled. It works well, but obviously doesn't track what changes were made. In my case it was "enough" to be able to track down the user in question...



______________________________________________________________________________
"Never argue with an idiot; They'll drag you down to their level and beat you with experience"
Post #1544655
Posted Tuesday, February 25, 2014 10:08 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, September 15, 2014 11:09 AM
Points: 869, Visits: 2,399
In the past, you can't tell.

For the future, the usual DML triggers on the msdb job tables can record this information. As always, beware of impersonation (i.e. ORIGINAL_LOGIN() may be useful, plus the usual application name, host name, transaction time, and so on).

Caveat - it gets messier if you're trying to find the user a SID (such as the owner) belongs to for a change two weeks ago, if the user no longer exists. Unless you have a ton of msdb job changes, it's probably not going to hurt performance much to do the joins to track the sids down even in the trigger.
Post #1545047
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse