Can you generate script for a maintenance plan?
I know how to script a job, I was wondering about a plan.
If not, whats the best way to record the configuration?
Thanks
LystraLook into the following tables in MSDB:
sysdbmaintplan_databases
sysdbmaintplan_history
sysdbmaintplan_jobs
sysdbmaintplans
sysjobhistory
sysjobs
sysjobs_view
sysjobschedules
sysjobservers
sysjobsteps|||Please forgive me, but what will looking into those tables get me?
Thanks
Lystra|||I think that when you script a maintenance plan, you get a GUID-like reference which is the unique identifier for the plan. There are some additional parameters which are included, but in general the script is not readable nor would it help in recreating a plan (because of the unique reference).
I generally try to build my plans in a similar fashion (checking off the same options). The only variation I may factor in is a different timing scheme (so that I minimize contention as the backups are being written to the network drive). Each server has a User database maintenance plan and a system database maintenance plan.
I then make notes somewhere so that in case I am hit by a Mack truck a new DBA could (hopefully) pick up and understand where I had left off.
This is okay in my environment where I have about 10-12 servers to manage. It gets a bit out of hand when you get into some of the hosted environs where there might be hundreds of servers to monitor.
Regards,
hmscott
No comments:
Post a Comment