Backup and Restore Maintenance Plans and Jobs
Backup and Restore Maintenance Plans and Jobs in SQL Server
In SQL Server Maintenance Plans and Jobs are stored in the MSDB system database in the table msdb.dbo.sysssispackages.MSDB contains all Agent details, Agent Jobs, DTS packages, Maintenance plans.
In the event a maintenance plan (or a job) is deleted or amended there is an option to restore all of the maintenance plans and jobs from the last backup by restoring the MSDB system database.
Turn off agent
Restore MSDB database
Turn on agent
Please be aware this method should only be used when restoring onto the same version of sql server because of potential system database compatibility issues between versions of sql server.
In the event of a migration to a newer version then either the maintenance plan needs to be manually recreated on the new server - or there is a way of exporting the ssis package to a file and importing it to the new version. I have not covered this here as have not yet tried and tested this.
Comments