Exporting Maintenance plans

  • We are moving our databases to another server (both old and new server SQL Server 2008 v2). Is it possible to script (or export otherwise) the maintenance plans? I can't see the option, although it is obviously possible to script other jobs.

  • Type "move maintenance plans" into your favourite search engine. When I tried that, I got quite a few links that looked as if they were just what you're looking for.

    John

  • Keeping in mind that maintenance plans are SSIS packages you could start here: Importing and Exporting Packages.

    In SQL Server 2008 Your maintenance plans usually live in msdb.dbo.sysssispackage.

    FYI: This will return a list of Maintenance plans:

    SELECTf.foldername AS folder,

    p.name,

    p.description,

    p.createdate

    FROM msdb.dbo.sysssispackages p

    CROSS APPLY

    msdb.dbo.sysssispackagefolders f

    WHERE f.foldername='Maintenance Plans'

    AND p.folderid=f.folderid

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply