Job disabled?

  • Hi! 

    I need to write a TSQL statement, to check if a specific job is disabled.

    Thanks.

     

  • Thanks, just found it:

    IF (SELECT enabled FROM msdb..sysjobs(nolock) WHERE name = '[Job Name]')=0

    PRINT 'OK'

    ELSE PRINT 'Job [Job Name] is NOT disabled'

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply