Created
August 3, 2021 19:16
-
-
Save sneakymonk3y/d8c0dee3a5824fedb4fc520aeeecebf5 to your computer and use it in GitHub Desktop.
Revisions
-
sneakymonk3y created this gist
Aug 3, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ SELECT job.job_id as [JOB_ID], job.name as [JOB_NAME], job.description as [JOB_DESCRIPTION], steps.step_name, steps.subsystem, steps.command, SUSER_SNAME(job.owner_sid) as [JOB_OWNER], steps.proxy_id, proxies.name as [proxy_account], job.enabled, steps.server, job.date_created, steps.last_run_date FROM [msdb].[dbo].[sysjobs] job INNER JOIN [msdb].[dbo].[sysjobsteps] steps ON job.job_id = steps.job_id left join [msdb].[dbo].[sysproxies] proxies ON steps.proxy_id = proxies.proxy_id ORDER BY JOB_NAME, step_name