The following is a step by step demo, which i delivered to teach other ETL people in my company,
Create a ETL package, which move data in one table (Service_Provider_Master) to another table (temp_Sevice_Proivider_Master) in the local database
Step.1 , On Local Server (WKYYZ23-ARMS20), Create a new ETL project, save the solution in C:\David\David_Deploy_Example , rename the default package as table_to_table_data_move.dtsx.
Step.2 Create a new connection manager (WKYYZ23-ARMS20.airportBIDM_ODS) to connect to database airportBIDM_ODS
Step.3 Create a dataflow task which move data in one table (Service_Provider_Master) to another table (temp_Sevice_Proivider_Master) in the local database (airportBIDM_ODS_15jun09-Full) .
Create the configuration file for the package which you want to deploy to another server.
Step.4 In the “Control Flow” tab, right click on the design surface and select “Package Configurations…” from the pop-up menu.
Step.5 . Tick the check box “Enable package configurations”
Step 6. Click the “Add…” button, to open the “Package Configuration Wizard”
Step 7 . In the “Configuration Type” combo box select “XML Configuration File”
Step 8 . Click “Browse…” to select a location for the XML configuration file
Step 9. Specify a file name in the “Select Configuration File Location” dialog box and click Save. Here I selected C:\David\David_Deploy_Example\table_table_data_move_config.dtsConfig
Step 10 . Click “Next” in the package configuration wizard
Step 11 . In the “Objects” tree structure, expend folder “connection managers”…… “WKYYZ23-ARMS20” ……properties, tick the objects “connection string” for which you want to generate the configuration file, and click “Next”,
Step 12 . Provide a name for this configuration, table_to_table_data_move_config_file and click “Finish”
Step 13 In Windows explore, go to C:\David\David_Deploy_Example and open file “table_table_data_move_config.dtsConfig” with any XML editorL:
<?xml version=”1.0″?>
<DTSConfiguration>
<DTSConfigurationHeading>
<DTSConfigurationFileInfo GeneratedBy=”WKYYZ23-ARMS20\Arms” GeneratedFromPackageName=”table_to_table_data_move” GeneratedFromPackageID=”{1EB78EDA-E5D7-4843-90CE-4203730E9288}” GeneratedDate=”11/5/2009 1:40:22 PM”/>
</DTSConfigurationHeading>
<Configuration ConfiguredType=”Property” Path=”\Package.Connections[WKYYZ23-ARMS20.airportBIDM_ODS].Properties[ConnectionString]” ValueType=”String”>
<ConfiguredValue>Data Source=WKYYZ23-ARMS20;Initial Catalog=airportBIDM_ODS_15jun09-Full;Provider=SQLNCLI10.1;Integrated Security=SSPI;Application-table_to_table_data_move-{77EF74ED-52CF-4B5A-B785-5453E3462CE9}WKYYZ23-ARMS20.airportBIDM_ODS_15jun09-Full;Auto Translate=False;</ConfiguredValue>
</Configuration>
</DTSConfiguration>
Step 14 Copy the parckage and configuration file to antoehr machine (AC-6F689A61BAA3) on which SQL Server 2008 is installed and the database we want to use is airportBIDM_ODS_backup
Step 15, On the target machina Open the configuration file and change the ConfiguredValue as following
<ConfiguredValue>Data Source= AC-6F689A61BAA3;Initial Catalog= airportBIDM_ODS_backup;Provider=SQLNCLI10.1;Integrated Security=SSPI;Application-table_to_table_data_move-{77EF74ED-52CF-4B5A-B785-5453E3462CE9}WKYYZ23-ARMS20.airportBIDM_ODS_15jun09-Full;Auto Translate=False;</ConfiguredValue
Appendix
Guidelines on using XML configuration files in SSIS:
Connection and XML configuration file naming conventions: When creating a new OLE DB database connection, use the following naming convention for your connections:
SERVERNAMEdatabasename
Note: You will have to rename your connection in the connection manager, after the connection is created.
For example, a connection to a server named LDNSrv1 and MyDB1 database should look like:
LDNSRV1mydb1
Notice that the server name is in CAPS and the database name is in lower case. However, this is just a guideline, and feel free to go with the naming convention that you are comfortable with.
Remember to follow the same casing standard everywhere, as SSIS connection names are case sensitive.
Use the same naming convention for the XML configuration files. Make sure your XML configuration files have the .dtsConfig extension. By default SSIS looks for this extension. But any other file extension will work too.
For example, the XML configuration file for Nyk1 server and Stocks database should be named:
NYK1stocks.dtsConfig
Managing XML configuration files: Store all the XML configuration files in a standard location on all servers. For example, at F:\UDL folderCreate a separate XML configuration file for each server and database combination. This approach is better than storing multiple server configurations in a single XML file. The reason being, if you need to edit connectivity information for a single server, you will directly edit the XML file for that server only. This reduces the chances of accidentally changing information for other servers.
If you are connecting to more than one server in your SSIS package, add the relevant XML configuration file for each server and database combination. You can add multiple configuration files from the “Package Configurations” screen, as shown in the below image:
For example, if your package is connecting to Srv1.db1 and Srv2.db2, then you would add the following XML configuration files to your package:
SRV1db1.dtsConfig
SRV2db2.dtsConfig
Always reuse existing XML configuration files, if one exists for your server and database combination. This is the sole reason behind configuration files, as you will have to update connectivity information in only one place. If there isn’t a configuration file already created for your server and database combination, create a new configuration file using the below templates and follow the described naming convention.
For Windows authenticated connection to SQL Server:
<DTSConfiguration>
<Configuration ConfiguredType="Property" Path="\Package.Connections[SERVERNAMEdbname].Properties[ConnectionString]" ValueType="String">
<ConfiguredValue>Data Source=[SRVNAME];Initial Catalog=[DBNAME];Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;</ConfiguredValue>
</Configuration>
</DTSConfiguration>
For SQL Server authenticated connection to SQL Server:
<DTSConfiguration>
<Configuration ConfiguredType="Property" Path="\Package.Connections[SERVERNAMEdbname].Properties[ConnectionString]" ValueType="String">
<ConfiguredValue>
Data Source=[SRVNAME];Initial Catalog=[DBNAME];User ID=[LOGIN];password=[PWD];Provider=SQLNCLI.1;Persist Security Info=True;Auto Translate=False
</ConfiguredValue>
</Configuration>
</DTSConfiguration>
Note: In the above templates, square brackets [] are not required except around the name of the connection. Do not surround server name, database name, user name and password with square brackets
Populating global variables using XML configuration files: When dealing with Active directory shares or file paths (for connections to source and target text files or data files), do not hardcode the domain names or machine names. Instead, use variables. These variables can be populated from the XML configuration files. Once a variable is created in the SSIS package, its value can be populated from the XML configuration file. For example, here’s what you need in the configuration file, to populate the variable called Domain with a value of “NykLive”:
<DTSConfiguration>
<Configuration ConfiguredType="Property" Path="\Package.Variables[User::Domain].Properties[Value]" ValueType="String">
<ConfiguredValue>NykLive</ConfiguredValue>
</Configuration>
</DTSConfiguration>
Note: Variable names are case sensitive too. So make sure you follow the same case when referring to the variables in the configuration files, script tasks etc.