posted 3/10/2010 1:48:38 PM by BradSchacht
Package Configurations in SSIS are key to making your packaged portable across the entire development process. The problem you being to face with configuration files is the quantity that you collect. Recently I was working on a project where we had pacakge level configurations as well as a configuration for each connection. In order to to updates on this would have taken a very large amount of time, especially since I had to make configuration files for dev and production. I opted to go with configuration tables instead as updates could be applied in mass using an UPDATE statement.All of the file locations and database connections were the same, the machine names just needed to be changed. REPLACE comes in very handy in this situation. Of the 145 rows in my configuration table, which told the variables in my packages what the values should be, abuot 90 of them were using the same shared drive, we will refer to it as PRODUCTION. I wanted all of those to point to the new shared drive called DEV. REPLACE will take a value and as the name suggests, replace it with another value and this can easily be used in an UPDATE.UPDATE TableNameSET ColumnName = REPLACE(ColumnName, OldValue, NewValue)This is going to not change the entire value for the column like a normal update would do. Let's take a string \\PRODUCTION\Files\File.txt in the column ConfiguredValue that we want to fix for our DEV environment.UPDATE SSISConfigurationsSET ConfiguredValue = REPLACE(ConfiguredValue,'PRODUCTION','DEV')Our output would be a configuration value that is ready for the DEV system: \\DEV\Files\File.txtThis could obviously be used in other situations, but it is a great way to quickly creat a configuration table for environments if you aren't already using configuration tables, or if you are migrating and need to change a lot of information in your configuration tables.
BradSchacht (Member since: 10/22/2009 5:26:20 PM) I am a consultant, product support and product tester for Pragmatic Works in Jacksonville, Florida.
View BradSchacht 's profile
Leave a comment
It's fast, easy and free! Submit articles, get your own blog, ask questions & give answers in the forums, and become a better developer, faster.
enter your email address: