Update Database Maintenance Plan using a script;
Hi Currently we have a 2008 server which uses maintenance plan for full and log backups ,Is there a way to update the maintenance plan using a script? Because we would like to add/remove databases that needs to be backed up on a frequent basis. Seems like opening the maintenance plan changing it every time is very time consuming. Thanks Jay
January 13th, 2012 12:06am

Goto Agent jobs - Select your Backup Job Right Click and Select New Query Editor Window include delete stmt to delete your job from msdb..syscategories and make the changes for your backup and run the script. This will remove your existing job and recreate with new changes. Nag Pal MCTS/MCITP (SQL Server 2005/2008) :: Please Mark Answer/vote if it is helpful ::
Free Windows Admin Tool Kit Click here and download it now
January 14th, 2012 9:10am

I am not sure I explained my question clearly, I know how to add modify sql agent job steps etc, I would like to update the maintenance plan(ssis package) since adding removing databases to maintenance plan requires to open the plan manually(under Management->Maintenance Plan) and update them I would like to update the plan using a script/config file if possible. Thanks
January 14th, 2012 9:57am

Hi jr81, Here is a simlar thread, please refer to: http://social.msdn.microsoft.com/Forums/en/sqldatabaseengine/thread/269a6ee8-7a54-4bd4-87f9-595235297d10 And this article talk about how to alter Database Maintenance in script, please see: http://www.simple-talk.com/sql/database-administration/automate-and-improve-your-database-maintenance-using-ola-hallengrens-free-script/ Thanks, Eileen
Free Windows Admin Tool Kit Click here and download it now
January 21st, 2012 1:18am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics