There are several ways of deploying SSIS dtsx packages under SQL 2005, but I like this one the best. It allows almost "one touch" style deployment of an entire project of packages. It makes use of package configurations. You may find you need to make several changes to every package in your solution, but you'll only need to do it once.
Once it's done you can copy your packages from DEV to LIVE without having to worry about different locations and connection strings in your live environment
Setting up your DEV and LIVE environments
- Create a new database on your database server, I've called mine SSISConfig. Don't add anything to it, BI Studio will do that for us.
- Create a new environment variable on each machine. I've called mine DW_CONFIG.
Start -> (right click) My Computer -> Properties -> Advanced -> Environment variables -> New
give this variable a value that points to what will become your configuration database (where all other csv file locations, excel connection strings etc will be stored). For Example, my database is called SSISConfig:Provider=SQLNCLI.1;Data Source=dur-vmdevolap-01;Integrated Security=SSPI;Initial Catalog=SSISConfig
Note that your changes won't take effect until you restart. You can see what is in effect by opening a cmd window and typingSET
You can make temporary changes that will be immediately effective by usingSET DW_Config=SQLNCLI.1;Data Source=dur-vmdevolap-01;Integrated Security=SSPI;Initial Catalog=SSISConfig
Setting up your SSIS Packages
- Open your DTSX project using BI Studio / VS 2005
Go to project Properties -> Deployment Utility -> Create deployment Utility
Set the value to true - In the "Data Sources" folder of your project, create a datasource pointing at your SSISConfig database as it is found on DEV. It's also a good opportunity to create a Data Source object for each database system your packages might connect to.
- Open each package in turn and:
- Create a new connection under Connection Managers. Select the "New connection from data source" option, select your SSISConfig data source
- Right click on the design surface and select "Package Configurations" (you may have to enable them first)
- Add a new package configuration, select "Environment Variable", and provide the value "DW_Config"
- Now add another package configuration, select "SQL Server", choose the connection "SSISConfig", press the "new" option beside Configuration table and use the defaults. For "Configuration Filter" use a name that uniquely identifies this configuration parameter (eq "DataWarehouse Connection String"). Press next, then select the property you wish add to the configuration (normally "Connection String")
When making these changes to further packages, be sure to reuse the same "Configuration Filter" value when you conceptually mean the same thing. It will ask if you wish to "reuse" or "overwrite". Choose reuse.
Once you are finished, inspect the results of your work by running
USE SSISConfig
SELECT * FROM SSIS Configurations
You should see your configuration entries. Backup and restore this database to your live server, then change the data in the "ConfiguredValue" column to represent the locations/connections that exist on the live system.