1

In order to enable operational management of data integration processes developed in SSIS, I am seeking to be able to externally configure:

  1. server (data source)
  2. database (catalog)
  3. schema

From what I have seen, all of these are typically hardcoded into SSIS packages through the Connection Manager and in SQL statements. This hardcoding limits the DBA from being able to allocate resources differently and, if there is ever a change, requires every package to be modified if Package Deployment is being used.

It appears that the Project Deployment would reduce this somewhat, but no eliminate it.

Target environment is SQL Server 2016 and VS 2017.

How can the server, database, and schema be externalized from the package?

Hadi
  • 36,233
  • 13
  • 65
  • 124
lit
  • 14,456
  • 10
  • 65
  • 119

1 Answers1

1

SSIS has a robust facility for configuring packages per environment. You can configure any property in the package externally. This can be done in SQL Agent and even from the command line at runtime. Configurations can be stored in config files, system environment variables, a SQL table, etc. However, the modern way of configuring packages is through the project deployment model.

Here is the gist of how it works:

  • Add a parameter at the package or project level
  • reference that parameter in an expression which configures the property you want to set, i.e. the server name or initial catalog
  • Deploy the project to an instance of SSIS
  • In SSIS, add an environment and configure the variable. This can even be passwords which are securely stored
  • Add a reference to that environment from the project, and finally reference which environment you want to use at runtime.

The first link below shows a dialogue that was created for configuring connection managers with parameters. Please note that the package will store the default values, but when you create an environment as noted above, this allows you to easily set it at runtime.

As for configuring a schema, this is possible as well, by using parameters, but you would need to use expressions for your SQL queries and setting the destination. I would avoid making schemas variable across environments. This will present a lot of effort and complexity for very little flexibility that is offered in return. Please read up on these links and good luck!

Hadi
  • 36,233
  • 13
  • 65
  • 124
Mark Wojciechowicz
  • 4,287
  • 1
  • 17
  • 25
  • Many thanks. I will look into it. Unfortunately, the organization is on the Package Deployment model currently. I have heard it said that they could not do Project Deployment for some reason. But, like Rick in Casablanca, the reasons are not quite clear. – lit May 15 '19 at 21:46
  • In that case, please check out this post which shows how to use indirect configurations. This uses a combo of a sql table and an environment variable. I found it easier to maintain configs in table https://radacad.com/sql-server-indirect-configuration-ssis – Mark Wojciechowicz May 16 '19 at 12:08