How to check the status of a SQL job?

  • Hi,

    I need to check whether a specific job is currently running or not. how can i achieve this using SQL commands?

  • You can check the system tables in the msdb database - sysjobactivity and sysjobhistory...

    you should be able to get information on current job activity and status from sysjobactivity and information on executed jobs from sysjobhistory...

  • You should use the system stored procedures (sp_help_job). Microsoft can (and does) make schema changes to MSDB without much notice.

  • sp_help_job is what I'd use as well.

  • check out xp_sqlagent_enum_jobs as well.

    ---------------------------------------------------------------------

Viewing 5 posts - 1 through 4 (of 4 total)

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