Wednesday, March 7, 2012

Retrieve package varialbe from SQL configuration table?

Hi,

I have been trying to get a variable in my package to retrieve its data from the SQL configuration table.. so that in future i am able to alter them all easily.

On the SSIS > Package Configurations menu, there seems to only be the option to pass a variable FROM the package TO SQL

whereas what i want to do is infact the opposite...

any help would be much appreciated

regards

Chris

You were on the right track, you just second-guessed yourself.

On SSIS > Package Configurations menu set the following...

-Configuration type: 'SQL Server'

-Connection: 'Name of you SQL Server connection manager'

-Configuration table: 'Name of your SQL Server configuration table'

-Configuration filter: 'The name of the field that identifies the variable(s) you want to bring in to ssis'

This will not pass variables from SSIS to SQL Server but from the way you want it to, SQL Server to SSIS

|||Hi,

cheers for that, it turns out that it was wokring fine all the time!

I was expecting the variables to get updated when the package ran, but instead they seemt o get updated when the package is opened..

very odd

how does this affect the variables when the packages are run from outside of SSIS, i.e. scheduled in SQL Server?

Thanks!
|||

However the package is executed, it will always pull from that SQL Server config table to get the most current information.

So whether you execute the package in BIDS, or from a command line, or from SQL Server Agent, each will poll the table for current information each time. As you've found out, it also polls the table every time you open that package.

|||

Configurations are checked/updated on many occasions:

-Upon first opening up the package.

-In BIDS when you right-click on a package in the solution explorer and click 'reload with upgrade'.

-Run-time. Regardless of how it is executed (sql server agent, dtexec,BIDS).

No comments:

Post a Comment