question

ervaibhavg avatar image
ervaibhavg asked

Who deleted job history?

There is job for dataload in my production server. Someone(anyother DBA) mistakenly executed that job an then cancelled the job within few seconds. Then he\she cleared job history using GUI for the same job. My questions are :- Is there any query to know who deleted that job history? Is there any location on msdb from where i can retrieve complete job history(even deleted ones) since its first execution to know who executed that job?
job-history
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
WilliamD avatar image
WilliamD answered
If you have backed up the msdb (as you should do), you can restore it (under a different name) and recover the job history from there. As far as knowing who cleared the history; that is not recorded anywhere by default. You would have had to have a trace running to make note of that process being run. This is something you have to program yourself, so if you didn't have it, you have no way of knowing now.
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ervaibhavg avatar image ervaibhavg commented ·
but if he\she cleared history within minutes after execution of job then how can i retrieve job history evn from that msdb backup.
0 Likes 0 ·
WilliamD avatar image WilliamD commented ·
If the database is in FULL recovery mode, you could backup the log and restore to a moment just before the job history clear happened. Other than that, you have lost the data
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.