Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to pass the source and destination names for database and SQL Server in dynamic manner.
Steps I followed is

1 . Created Variable for source database name and destination names
in values I have entered the name of database.
SQL SOurce name : XYZ
Source Database Name : S1
SQL Destination :YYY
Destination Database Name :D1

In connection manager in properties in expression I want to give connection string. I dnt know what to write in connection string.
Posted
Updated 17-Nov-15 17:21pm
v2

 
Share this answer
 
Comments
Nandhini Devi 18-Nov-15 1:38am    
Thanks but I am trying to connect my database dynamically using variable in SSIS
Mehdi Gholam 18-Nov-15 1:39am    
When your connection string is dynamically built then your connection is dynamic.
"Provider=SQLNCLI10.1;Data Source="+ @[User::SourceSQL] +";Integrated Security=SSPI;Initial Catalog="+ @[User::SourceDB] +";"



This is how I used the string to connect dynamically.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900