Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 How to change dynamically the connection string.

Author  Topic 

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2007-11-15 : 12:29:14
Hi,

I am looking to dynamically change the connection string in my SSIS package, to avoid changing the connection string each time I want to run in different environments.

Thanks in advance

Hommer
Aged Yak Warrior

808 Posts

Posted - 2007-11-15 : 12:55:39
Use a variable to hold it, then save that into the configuration file.
Go to Top of Page

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2007-11-15 : 14:08:17
quote:
Originally posted by Hommer

Use a variable to hold it, then save that into the configuration file.



If possible can you direct me to tutorial example.
Go to Top of Page

igorblackbelt
Constraint Violating Yak Guru

407 Posts

Posted - 2007-11-15 : 14:15:22
You can also construct the connection string using expressions, you can have the Server and/or DB name as variables that you can pass to the SSIS package at execution time.

The link below might help you, but it's not exactly what I wanted to show you. I believe Jamie has a post on his blog (http://blogs.conchango.com/jamiethomson/) that's exactly what I wanted, but I can't find what I want in there.

http://www.mssqltips.com/tip.asp?tip=1084
Go to Top of Page
   

- Advertisement -