Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

3 Answers 3

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

 
discard

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