Tag: MSSQL JOBS

SQL – Getting list of jobs and their steps

How to get list of jobs an their steps. For this I will use three tables dbo.sysjobs, dbo.sysjobsteps and dbo.sysjobschedules in msdb database. You can create select from each of these tables to get relevant data. select name,enabled,description from msdb.dbo.sysjobs select job_id,step_id,step_name,command,database_name from msdb.dbo.sysjobsteps select job_id,next_run_date,next_run_time from msdb.dbo.sysjobschedules   But we can combine these three …