0

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

3 Answers 3

2

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

1

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.

1

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.

You must log in to answer this question.