Skip to content

Instantly share code, notes, and snippets.

@royashbrook
Created February 27, 2018 19:06
Show Gist options
  • Save royashbrook/5cde18572d35700a1e3181341c7055e0 to your computer and use it in GitHub Desktop.
Save royashbrook/5cde18572d35700a1e3181341c7055e0 to your computer and use it in GitHub Desktop.
select
[job] = j.name
, s.step_id
, [step] = s.step_name
, [cmd] = s.command
, [db] = s.database_name
from
sysjobs j
join sysjobsteps s on
s.job_id = j.job_id
where
j.name = 'Your Job Name'
order by
j.name
, s.step_id
for xml
auto
, elements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment