Find a SQL Job from an JobStepID

Looking through Waits in my MDW I often see things like …

Program Name: SQLAgent- TSQL JobStep (Job 0xD56…

… and can get the job name from …

SELECT * 
FROM msdb.dbo.sysjobs
WHERE job_id = 0xD56...

Or even better! to go directly from the JobStep-ID to the Executable causing the issue …

SELECT * 
FROM msdb.dbo.sysjobsteps
WHERE job_id = 0xD56...

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s