Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

can I query the schedule of a maintenance plan? I want to automate checking that backups were run. Thanks

share|improve this question

What about setting up an Operator, configuring Database Mail, and having an email sent whenever the job runs?

share|improve this answer

Check out the sysmaintplan_logdetail table in MSDB. It contains the start and end time of jobs that were run as well as if they succeeded.

share|improve this answer

MS SQL has built in methods for this. The following stored procedure will give you lots of useful information regarding the schedule, last run and whether it was successful.

EXEC msdb.dbo.sp_help_job @Job_name = 'YourMaintenancePlan.NameHere'

Also have a look through all the sp_help... system stored procedures in the msdb database. There are some awesome procedures in there that will answer almost all questions. Remember you can look into there details for what these system stored procedure do by using the sp_helptext procedure and then create your own custom procedures.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.