Sql Server Jobs Control
Published in
1 min readDec 24, 2023
This SQL query retrieves information about SQL Server Agent jobs, including details about the job, its schedule, and the recent execution history.
SELECT
CONVERT(SYSNAME,SERVERPROPERTY('Servername')) AS Server,
job.name AS JobName,
CASE WHEN job.enabled=1 Then 'Enable' else 'Disable' END [JobUsing],
job.description,
job.date_created,
cat.name AS CategoryName,
sch.next_run_date,
sch.next_run_time,
srv.last_run_outcome…