SSIS package not using configuration from SQL server table

Hello all,

I have an issue with my SSIS package not using the package configuration specified in my SQL server table. This is a simple scenario where I need to move data from a csv file to a SQL server table.

I have 2 connection Managers - one for the location of CSV file and another for the SQL database connection string. I chose to Enable Package configuration. Two configurations -

a. Environment variable to store the database connection string.

b. SQL server table configuration for flat file connection manager.

The location of the CSV file is dynamic..so the idea is to change the path as and when needed in the SQL table.

No errors..everything works fine except that the properties of the flat file connection manager is not being pulled from the SQL server configuration table. It uses the location I had specified during design time.

How do I force the SSIS package to use the configuration specified in the SQL table always.

I've been spending a lot of time on this with no success. Please help..

Thanks

Karthik

[1114 byte] By [kforkarthik] at [2008-1-2]
# 1
Is the configuration table in the same database that is being set from the environment variable?
jwelch at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 2

What connection manager are you using in the sql server based configuration and how is being set up at run time?

I have an example in my blog where a similar issues is address:

http://rafael-salas.blogspot.com/2007/01/ssis-package-configurations-using-sql.html

RafaelSalas at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 3

Thats for your reply Rafael and John.

The configuration is in the same database as set in the env variable.

I am following the same instructions as in

http://rafael-salas.blogspot.com/2007/01/ssis-package-configurations-using-sql.html

This is procedure I followed for package configuration in that order-

1. SSIS --> Package configuration

2. Add --> Configuration type = Environment variable --> Choose the env variable I had created for DB connection --> From properties list choose connection string for the DB connection manager --> Give a name --> OK.

2. Add a second configration of type SQL server --> Choose Specify configuration settings directly --> Choose the db connection manager --> specify the configuration table --> Set configuration filter --> Next --> Choose all objects for configuration

Al I missing something here?

Thanks

Karthik

kforkarthik at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 4
If running the package manually, you need to close the package and reopen it to pick up any changes to the package configurations.
PhilBrammer at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 5

I tried that too. I ran it manually from Development studio...tried running by double clicking on the dtsx file. No sucsess. It is not picking up the settings from the SQL server config table.

I must be missing something..I haven't seen anybody else having this problem.

Thanks

Karthik

kforkarthik at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 6
I almost wonder if Environment Variables take a lower package configuration precedence than XML config files and/or SQL Server-based configurations.
PhilBrammer at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 7

I've used both XML files and environment variables to set an initial connection for my SQL configs, and set the rest of my configurations from the SQL table. I've never had any problems with this approach.

Can you confirm that the enviroment variable configuration is the first item in your configuration dialog?

jwelch at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 8
John..thats correct. The env variable config is placed first on the config list followed by SQL server config.
kforkarthik at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 9
Is it a system environment variable, or a user environment variable?
PhilBrammer at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 10
Phil..it is a system env variable...and I can that the package is picking up the env variable correctly.
kforkarthik at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 11

kforkarthik wrote:
Phil..it is a system env variable...and I can that the package is picking up the env variable correctly.

How do you know?

PhilBrammer at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 12

When I open the package with Execute Package Utility --> ConnectionManager --> dbconnection

I see that the value for connection string is what I specified in the env variable. I even changed the value for env variable and made sure it is reflected on the db connection manager.

kforkarthik at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 13
Do the values for the other configurations reflect the SQL table value in the dev environment? If not, are you getting any warning messages when you open the package?
jwelch at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 14
And when you open it in BIDS, look at the output/errors/warnings to see if anything shows up, to echo John's comment.
PhilBrammer at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Integration Services...

SQL Server

Site Classified