So, I have a scenario where I'm working in SSIS 2012 on SQL Server 2012 with SQL Server Data Tools 2012 (SSDT), and in order to ensure all the packages are both coming to me and going to others with the same level of protection and level of editability, I need to change all of the protection levels of all the packages in my solution, all at once. Somehow, somewhere, one or more of them got reset to a non-default value - or maybe, we need to pull one back from some other source - either way, at anything above about two packages, this gets to be a real pain.
I found two options:
Before you do anything else:
I found two options:
Before you do anything else:
- First things first, commit everything to source control, close SSDT, and make a zip backup of the whole project folder.
- Verify the backup.
Then:
- Set or Change the Protection Level of Packages
- http://technet.microsoft.com/en-us/library/cc879310.aspx
- Now, open a command prompt at the folder with the packages you want to modify.
- Next, create either a command window, or a command file (AKA batch file) with this:
- for %f in (*.dtsx) do dtutil.exe /file %f /encrypt file;%f;2;strongpassword
- What I wanted instead was to set them to DontSaveSensitive, plus, I have spaces in the file names (radical, I know), so I used this:
- for %f in (*.dtsx) do dtutil.exe /file "%f" /encrypt file;"%f";0 /Q
- The /Q doesn't prompt to overwrite the existing package
- You can find more about the DTUtil syntax here
- Open the .dtproj file using your favorite text editor, and do a find and replace on some strings like
- me="ProtectionLevel">3