How do I clean old data connections out of an SSIS package?

  • Evidently deleting them from within the interface is not a reliable way of doing it.

    I've got code referencing a data connection GUID that is not one of the showing data connections.

    I'd like to NOT go deleting stuff from the XML text, just in case I get something wrong.

    Is there a "CLEAN" function?

  • No "clean" function that I know of, manual labour I am afraid.

    To speed the process, use the property (F4) window, lists connections etc. of data flow and control flow components selected.

  • What is the proper procedure when deleting stuff? What do I check for to make sure I don't take out too much or too little?

    And, is there some better way of deleting through the interface to avoid this?

    BTW, I think I'm on 2008, not 2005. That 2005 designator was not very evident when I originally posted.

  • nonghead-webspam (3/27/2014)


    What is the proper procedure when deleting stuff? What do I check for to make sure I don't take out too much or too little?

    And, is there some better way of deleting through the interface to avoid this?

    BTW, I think I'm on 2008, not 2005. That 2005 designator was not very evident when I originally posted.

    Deleting through the interface is the only option available.

    There is no warning if you are going to delete something that is referenced by another object.

    So you just have to be careful and know your own packages 🙂

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • You can query the xml package file to list all connections, look at this thread for more info;

    http://www.sqlservercentral.com/Forums/Topic1380488-21-1.aspx

  • So you just have to be careful and know your own packages 🙂

    Unfortunately I'm "newer" to SSIS, and dealing with other people's packages (in part), but also my own.

    I guess the overriding factor is "newby-er".

    Good old Microsoft.

  • If I wanted to remove all existing connections and rebuild them, is there a process for doing this so I don't end up with orphans again?

  • Delete all connection manager, create your new ones. Open up each task and component and reassign to the correct connection manager.

    Run the package. If there's an error, repeat the previous steps until there is no error.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen Verbeeck (3/27/2014)


    Delete all connection manager, create your new ones. Open up each task and component and reassign to the correct connection manager.

    Run the package. If there's an error, repeat the previous steps until there is no error.

    Actually, that's sort of how I got in the mess I'm in now.

  • nonghead-webspam (3/27/2014)


    Koen Verbeeck (3/27/2014)


    Delete all connection manager, create your new ones. Open up each task and component and reassign to the correct connection manager.

    Run the package. If there's an error, repeat the previous steps until there is no error.

    Actually, that's sort of how I got in the mess I'm in now.

    Well, you don't have to blindly hit the delete button. 😀

    Make sure the connection manager is not used when you delete it. Documentation can help in that regard.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Well, you don't have to blindly hit the delete button. 😀

    Make sure the connection manager is not used when you delete it. Documentation can help in that regard.

    Point taken. Though, I think documentation is considered a social disease at this company. But that is another whiny story.

  • The way I would do this is :copy the package file, open the package in a text editor, delete everything including the tags between any instances of <DTS:ConnectionManager> and <DTS:ConnectionManager />

    Open the package in BIDS, and work through all connection errors.

    There is no magic in the XML Package file, just make certain that you keep a copy of the file before changing it

    😎

  • nonghead-webspam (3/27/2014)


    Well, you don't have to blindly hit the delete button. 😀

    Make sure the connection manager is not used when you delete it. Documentation can help in that regard.

    Point taken. Though, I think documentation is considered a social disease at this company. But that is another whiny story.

    LOL, I think I've worked there 🙂

  • Eirikur Eiriksson (3/27/2014)


    The way I would do this is :copy the package file, open the package in a text editor, delete everything including the tags between any instances of <DTS:ConnectionManager> and <DTS:ConnectionManager />

    Open the package in BIDS, and work through all connection errors.

    There is no magic in the XML Package file, just make certain that you keep a copy of the file before changing it

    😎

    excellent. exactly what I needed. Thanks.

  • nonghead-webspam (3/27/2014)


    Eirikur Eiriksson (3/27/2014)


    The way I would do this is :copy the package file, open the package in a text editor, delete everything including the tags between any instances of <DTS:ConnectionManager> and <DTS:ConnectionManager />

    Open the package in BIDS, and work through all connection errors.

    There is no magic in the XML Package file, just make certain that you keep a copy of the file before changing it

    😎

    excellent. exactly what I needed. Thanks.

    Well, this is what I got when I tried that:

    Error1Error loading 'Weekly_FullSnapshots - Forecasts Live - xml edit.dtsx' : The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)).G:\Mhub_Operations\DATA\SSIS\Archive_Snapshots\Weekly_FullSnapshots - Forecasts Live - xml edit.dtsx11

Viewing 15 posts - 1 through 15 (of 17 total)

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