This article is a mirror article of machine translation, please click here to jump to the original article.

View: 24092|Reply: 0

[Source] SSIS Tutorial (6) Using SSIS Package XML Configuration Files

[Copy link]
Posted on 2020-8-2 18:24:28 | | | |
SSIS Tutorial 1 Introduction to SQL Server Integration Services
https://www.itsvse.com/thread-9257-1-1.html

SSIS Tutorial (2) Visual Studio 2019 (VS2019) Install SSIS
https://www.itsvse.com/thread-9331-1-1.html

SSIS Tutorial (3) Add a MySQL data source
https://www.itsvse.com/thread-9338-1-1.html

SSIS Tutorial 4 Synchronize MySQL Data to a SQL Server Database
https://www.itsvse.com/thread-9336-1-1.html

SSIS Tutorial (5) Executing SSIS Packages with DTEXEC
https://www.itsvse.com/thread-9339-1-1.html

The Integrartion Services package is actually a collection of object properties, in all the Integration Services packages we developed before, the variables, attributes, such as database links, synchronized file directories, etc., we directly use a constant in the package to assign these variables or attributes, which brings great trouble to the release and migration of this package, such as when we develop packages in the development environment. All variables and attributes are set according to the development environment, after the development is completed, to deploy this package to the production environment, DB connection, synchronization directory, etc. will change, the previous method: open the package in the new environment, reset the values of these variables or attributes, before it can run normally. Since Integration Services 2005, this problem has been solved with the addition of the [Package Configuration] feature. Profiles help package transfer seamlessly, and the configuration process can be automated, reducing deployment hassle and risk of errors.

The package configuration of the Integration Services program allows any SSIS attributes such as packages, connections, containers, variables, etc., to be written to an XML file or table and then read at runtime. There are several main types of configuration:

  • XML configuration file
  • environment variable
  • Registry keys
  • Parent package variable
  • SQL Server tables


On the Project menu, select Convert to package deployment model, as shown in the following image:



In the SSIS package, enable the package configuration, right-click on the blank space of the package, and select the package configuration, as shown in the following figure:



Check the Enable package configuration, select the XML configuration file, click Browse, and fill in the configuration name according to your situation, as shown in the figure below:




The server addresses of the source and destination are configurable, as shown in the following figure:



Finally, an SSIS package configuration example is generated: configuration file.dtsConfig

Generate the XML configuration code as follows:

Try to modify the server address to the wrong address, use DTExecUI to select the xml configuration file, re-execute the package, and the error is as follows:



(End)




Previous:SSIS Tutorial (5) Executing SSIS Packages with DTEXEC
Next:SSIS Tutorial (7) SQL Server 2012 Executes SSIS Jobs
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com