Getting Started with Adobe After Effects - Part 6: Motion Blur
A collection of quick technology learning tips from what people around you learn every day

Checking the Job Schedule status of a SQL job

Mar 30 2012 12:00AM by Manas Ranjan Dash   

Being into application support we check daily and weekly jobs schedule status that has been scheduled in SQL server in many servers for different projects. I wrote some queries to get the status as below.(if you have better solution please comment)

We can use a readymade solution SPHELP_JOBSCHEDULE store procedure which takes jobid, jobname, schedulename, scheduleid and schedule descirption. But this will return multiple columns and what if we have to query only the enabled status of a schedule.

So the other approach may be to query the MSDB table DBO.SYSSCHEDULES which will give us the 'enabled' column from which we can get the Schedule status of the job. For more information we can join the dbo.sysjobschedules and dbo.SYSJOBS.

SELECT * FROM DBO.SYSSCHEDULES WHERE [NAME]='JSCH_HR600d'

Earlier I have posted how to check the job execution status.

Read More..   [59 clicks]

Published under: SQL Server Tips ·  ·  ·  · 


Manas Ranjan Dash
39 · 5% · 1484
7
 
4
 
 
0
Incorrect
 
0
Interesting
 
0
Forgotten



Submit

4  Comments  

  • what we do is as and when a job succeed or fails...a mail will be triggered from sqlserver to dev team or DBA....its more maintainable I believe

    commented on Mar 30 2012 1:06AM
    satyajit
    126 · 1% · 402
  • @satyajit you are absolutely right. But as multiple servers are there we adopted that approach and are getting a consolidated mail for all server from a central machine.

    commented on Mar 30 2012 2:39AM
    Manas Ranjan Dash
    39 · 5% · 1484
  • @manas - based on your comment, do you use Central management server for consolidated email for all server status?

    commented on Mar 30 2012 9:05AM
    vanne040
    84 · 2% · 657
  • @Vanee not exactly we have some virtual machine and from that couple of scripts are running to check these status. I am not confident on the CMS :) also.

    commented on Mar 30 2012 11:03AM
    Manas Ranjan Dash
    39 · 5% · 1484

Your Comment


Sign Up or Login to post a comment.

"Checking the Job Schedule status of a SQL job" rated 5 out of 5 by 7 readers
Checking the Job Schedule status of a SQL job , 5.0 out of 5 based on 7 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]