sql agent

  • hi,

    how to verify if a sql agent job is running........

    thanks,

    nisha.

     

  • In EM you can expand the Management folder and see the status, last run date etc.. of the various scheduled jobs...or in QA you could query the system tables...something like:

    select sj.name, sjh.message, status =

    case sjh.run_status

    when 0 then 'Failed'

    when 1 then 'Succeeded'

    when 2 then 'Retry'

    when 3 then 'Canceled'

    when 4 then 'In progress'

    end

    from msdb.dbo.sysjobs sj

    inner join msdb.dbo.sysjobhistory sjh

    on sj.job_id = sjh.job_id







    **ASCII stupid question, get a stupid ANSI !!!**

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

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