question

shamim007 avatar image
shamim007 asked

where to see who stop my agent job

is there any way to see who stop my agent job and when?
sql-server-2008agent
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

·
JohnM avatar image
JohnM answered
You can look at the job history and see who stopped the job. You can also look at msdb.dbo.sysjobhistory for any job steps that have a run_status = 3 (Cancelled). The user who stopped the job should be listed within the Message column. You could programmatically strip that out I would imagine with a little bit of T-SQL code. Hope that helps!
10 |1200

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

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.