25 September,2014 by Tom Collins
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
SQL Server - Send sql server agent job history through email notification
SQL Agent Jobs – Schedule in seconds
List failed SQL server Jobs with Powershell
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |