x
login about faq Site discussion (meta-askssc)

Generate Maintenance plan create script from exists maintenance plan.

Hi,

I have maintenance plan that include sub-plan and job is associated with corresponding maintenance plan.

I am looking any option to generate maintenance plan create script from existing maintenance so I could change required database information and name and use that script for creating another maintenance plan with different database information.

Will be good if that script contain related job creation and schedule information.

more ▼

asked Apr 23 '12 at 12:54 PM in Default

Amardeep gravatar image

Amardeep
1.3k 71 82 86

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

The maintenance plans are stored in MSDB database, so to get this maintenance plan you should connect to SSIS in management studio, Expand MSDB, Expand Maintenance plans; This will list out the Maintenance plans present in the server. You can export this to your file system by right clicking it, Export Package, Choose Package Location to file system, and specify a location to save the maintenance plan as dtsx file to the disk. Later you can edit this using BIDS or Visual studio for any changes, Save the dtsx package and Exeport to SSIS.

more ▼

answered Apr 23 '12 at 01:12 PM

Cyborg gravatar image

Cyborg
10.1k 29 39 44

(comments are locked)
10|1200 characters needed characters left

Maintenance plans are not scripts. They are SQL Server Integration Services packages. You can't modify them without using either Management Studio or Database Tools (Business Intelligence Database Studio, BIDS for those on pre-2012).

more ▼

answered Apr 23 '12 at 01:09 PM

Grant Fritchey gravatar image

Grant Fritchey ♦♦
62.3k 12 20 66

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x1601
x83
x30

asked: Apr 23 '12 at 12:54 PM

Seen: 1071 times

Last Updated: Apr 23 '12 at 01:12 PM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.