Question: How can I list all SQL Server Agent jobs and the enabled status for the job? I want to execute a query and store the information for reference.
Answer: SQL Server Agent jobs are listed in the msdb.dbo.sysjobs table. The “enabled” column stores a flag, indicating whether the job can be executed.
SELECT @@servername, [name] as 'job name', [enabled] as 'enabled' FROM msdb.dbo.sysjobs