Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    191

    Unanswered: Maintenance Plan

    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

    Lystra

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Look into the following tables in MSDB:

    sysdbmaintplan_databases
    sysdbmaintplan_history
    sysdbmaintplan_jobs
    sysdbmaintplans
    sysjobhistory
    sysjobs
    sysjobs_view
    sysjobschedules
    sysjobservers
    sysjobsteps
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  3. #3
    Join Date
    Jul 2004
    Posts
    191
    Please forgive me, but what will looking into those tables get me?

    Thanks

    Lystra

  4. #4
    Join Date
    Dec 2002
    Posts
    1,245
    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
    Have you hugged your backup today?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •