I am trying to create a dynamic connection using Connection string. Required Details like (IP, DBname, username and password) are stored in database and I am fetching these details in from Execute SQL task and storing in variables. From these I am creating connecting string using expression. This works fine when I use Windows authentication with following connectionstring.
"Data Source="+ @[User::IP] +";Initial Catalog=" +@[User::DBN] +";Provider=SQLNCLI11;Integrated Security=SSPI;Auto Translate=False;"
However when I try to add username and password for SQL authentication SSIS is giving me error.
"Data Source="+ @[User::IP] +";User ID="+ @[User::USR] +"Password= "+ @[User::PASS] +" ;Initial Catalog=" + @[User::DBN] + ";Provider=SQLNCLI11.0;"
Error:
[OLE DB Source [22]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager XXXXXXXXXXXXX failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Not sure what wrong. Can somebody help me what is wrong I am doing here.
password- Hadi