Sunday, March 25, 2012

create a script for sql server 2005 database maintenance plan

hi,
after I manually create maintenance plan using SQL server Maintenence
Plan Wizard with SQL Server Management Studio, is there any way to
create a script for all these setting that I've done?
So that I can just modify the database name and run it on another pc,
the same setting will apply in this pc. Or is there other ways to do
it?
Thanks.
Hi
AFAIK there is no way of doing this for the whole plan, but the SQL for
individual tasks can be views in the View T-SQL button when they are editted.
John
"skyloon" wrote:

> hi,
> after I manually create maintenance plan using SQL server Maintenence
> Plan Wizard with SQL Server Management Studio, is there any way to
> create a script for all these setting that I've done?
> So that I can just modify the database name and run it on another pc,
> the same setting will apply in this pc. Or is there other ways to do
> it?
> Thanks.
>
|||but i can't find the path of my Database Maintenance Plan file that
created under Database engine.
when i connect Integration service, can't find the physical file, how
can i open the plan using SSMS or DTEXEC.EXE?
Tibor Karaszi wrote:[vbcol=seagreen]
> Here's an idea:
> A maint plan is an SSIS package stored in MSDB. You can use SSMS or DTEXEC.EXE to export that
> package to a file. That file is XML. You can now modify that file and distribute it to the target
> machines. (This is from theory, you need to experiment a bit...)
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "skyloon" <skyloon@.gmail.com> wrote in message
> news:1163998620.769408.161720@.j44g2000cwa.googlegr oups.com...
|||I've uploaded a picture for your reference because i can't find any
export function in SSMS. Mind to teach me step by step? Thanks.
http://img.photobucket.com/albums/v202/skyloon/1.jpg
Tibor Karaszi wrote:[vbcol=seagreen]
> You need to export it from msdb to a file first. Use either SSMS (connect object explorer to SSIS)
> or DTUTIL.EXE.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "skyloon" <skyloon@.gmail.com> wrote in message
> news:1164163325.802538.30390@.k70g2000cwa.googlegro ups.com...
|||Hi
If you wish to save a package to a file you would use BIDS and not SSMS. You
may want to check out http://msdn2.microsoft.com/en-us/library/ms137712.aspx
and the package deployment tutorial.
John
"skyloon" wrote:

> I've uploaded a picture for your reference because i can't find any
> export function in SSMS. Mind to teach me step by step? Thanks.
> http://img.photobucket.com/albums/v202/skyloon/1.jpg
>
> Tibor Karaszi wrote:
>

No comments:

Post a Comment