Delete Multiple Connection Managers SSIS

Have you ever wanted to save yourself some time by copying a package, renaming it, and then modifying its contents to suit your needs? What if the package that you are copying from has 60 connection managers, and your new package only needs 1? In SSIS, there is no ability to do a “select all” on the connection managers that you don’t need and delete them. So, we could go hand by hand and delete every single one by right-clicking it and clicking Delete.

But where’s the fun in that?! 🙂 I asked one of my co-workers about this scenario, and he suggested editing the XML of the package directly, which was a GREAT idea! (I wish I would have thought of that myself)

If you wish to delete these connections en masse, follow the instructions below.

1) Close your package if you currently have it open.

2) Right-click on your package and click View Code. This opens your package in XML mode.

3) Look for XML tags such as the one below (these blocks of code are the ones that you will want to delete):

<pre><DTS:ConnectionManager>

 

All you need to do now is to delete the block of code associated with the Connection Managers that you wish to delete.

That’s it! Now you don’t have to worry about wasting time trying to delete multiple Connection Managers one-by-one.

This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Comments are closed.