Home > SQL Server > Get SQL Job Status Report from the Server

Get SQL Job Status Report from the Server


Hi SQL DBA,

We have n daily maintainance task in our hand. Apart from that, we should monitor the list of jobs running in the database server. how to do that with simple query?

Storedprocedure sp_help_job – supports SQL 2005, SQL 2008, SQL 2008 R2

use msdb
sp_help_job @enabled=1

This procedure return following columns. you can pick up only required column for your report.

job_id
originating_server name enabled
description
start_step_id category owner notify_level_eventlog
notify_level_email
notify_level_netsend
notify_level_page
notify_email_operator notify_netsend_operator notify_page_operator delete_level
date_created
date_modified
version_number
last_run_date
last_run_time
last_run_outcome
next_run_date
next_run_time
next_run_schedule_id
current_execution_status
current_execution_step current_retry_attempt
has_step
has_schedule
has_target
type

Below picture depict the sql job related tables.

Advertisements
Categories: SQL Server Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: