Delete the recovery of the "Maintenance plans" folder in SSIS by mistake

Source: Internet
Author: User
Tags management studio ssis

In SQL Server 2005/2008, the functionality of the maintenance plan is accomplished through SSIS packages. If you accidentally delete the maintenance Plans folder in SSIS Management, you will have problems setting up the maintenance plan in SQL Server, as shown in the following illustration.

Create the maintenance Plans folder that was mistakenly deleted in Management Studio, as shown in the following illustration.

After you have established the "Maintenance Plans" folder, you can establish a maintenance plan normally, but the established maintenance plan is not displayed, and you can find the appropriate SSIS package under SSIS's Maintenance Plans folder.

This problem occurs because the Maintenance Plan Wizard stores a maintenance plan's SSIS package based on the folder name, but the maintenance plan obtains a script for the maintenance plan related to the SSIS package by querying the View "Sysmaintplan_plans" to see its contents

EXEC msdb.. Sp_helptext ' Sysmaintplan_plans '

CREATE VIEW Sysmaintplan_plans

As

SELECT

...

From

Msdb.dbo.sysssispackages as S

WHERE

(S.folderid = ' 08aa12d5-8f98-4dab-a4fc-980b150a5dc8 ' and s.packagetype = 6)

As you can see from the view script, the view uses the FolderID instead of the name to get the content, our new "Maintenance plans" folder is basically not the ID, so update this view to refer to the correct folder ID, the normal folder IDs can be obtained by performing the following query.

SELECT *

From Msdb.dbo.sysssispackagefolders--SQL 2005 table name: SYSDTSFOLDERS90

WHERE foldername = N ' maintenance plans '

and Parentfolderid = ' 00000000-0000-0000-0000-000000000000 '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.