问题
Can you please explain the advantages/disadvantages of various configurations (xml, environment variable etc) in SSIS packages?
回答1:
You can get your own conclusions here
But according to my point of view:
On "SQL Server" you have a central database table where configuration entries can be stored and shared across servers and packages. BUT, you need a way to to tell your package which Server connect to get the configurations.
"XML File and Environment Variable" are machine dependent, so if you have more than one package using the same file you would have multiple copies of the configuration, one for each machine, and this configuration would not be centralized.
You can also have "Parent Package Variable Configuration" that is used when a package executes another package by using the Execute Package task.
I honestly prefer "SQL Server" because on a production environment, where access to developers is very limited, you usually have read access to the DB but you don't have access to the server were the XML file is located so if you need to check one configuration value you can simply run a select on the DB as opposed if you are using files its more complicated.
回答2:
SQL Server Integration Services (SSIS) is a very powerful tool for creating ETL Packages. Part of what makes it so powerful is its ability to use package configurations. Package configurations allow you to externally store information that the package needs so that information can be easily changed without re-writing the package itself. You can store connection strings, variable values, package passwords, isolation levels, and much more. Basically, if you can set the value in SSIS, it can probably be stored in a package configuration. This makes modifying a package, such as when it moves from QA to production, or when a production server’s name changes, much easier. Package configurations come in several flavors and which one you use will depend on your individual needs. Also, each type stores data differently, so in some cases multiple values can be saved and in others you can store only a single value. Here is a quick breakdown of the types of package configurations.
XML Configuration File – Multiple values can be stored in an XML file on disk
Environment Variable – A single value can be stored in a Windows Environment variable
Registry Entry – A single value can be stored in a registry key
Parent Package Variable – The parent package can pass a variable to the package which contains the configuration value
SQL Server – Multiple values can be stored in a table on an SQL Server
来源:https://stackoverflow.com/questions/10663343/whats-are-the-advantages-disadvantages-of-different-package-configuration-in-ssi