Dynamic OLEDB Connection Manager in SSIS
Why don't you pull it from a variable that is being updated based on a config file?
Found you a not a bad post on how to:
http://www.mssqltips.com/tip.asp?tip=1405
Arthur My Blog
November 30th, 2010 1:00pm
Hello,
I have to define a dynamic OLEDB connection manager in SSIS because the database name will vary each time I run the SSIS. Is it possible to update a variable before I start the SSIS and the connection manager gets its value from that variable becauase
eventually I want to automate the SSIS using SQL Agent and at that time I will only be able to pass variables and not update the connection details.
Thanks,
KK
Free Windows Admin Tool Kit Click here and download it now
November 30th, 2010 1:04pm
Why don't you pull it from a variable that is being updated based on a config file?Arthur My Blog
November 30th, 2010 1:08pm
Hi,
You can set the connection string of the connection manager using the expressions as well. Save your database name in a variable and set the OLEDB connection's initial catalog property to this variable.
Alternatively, you can generate the connection string at runtime using a script task. Have a script task just before you use your OLEDB connection and generate the connection string in this script task. The code for generating the connection string could
be found here -
http://dbaspot.com/forums/sqlserver-dts/183062-connecting-database-via-oledb-connection-manager-within-script-task.html
Hope this helps.
Cheers,
ShalinShalin Kapadia
Free Windows Admin Tool Kit Click here and download it now
November 30th, 2010 1:22pm
Thanks a lot Shalin!
November 30th, 2010 4:03pm