0

I am trying to dynamically set the connection string of my SSIS package through DTEXEC.exe

My CMD file consists of following command.

"C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTEXEC.exe" /f     
"D:\ABC\XYZ\Packages\ABCD.dtsx" /CHECKPOINTING OFF /REPORTING V /CONSOLELOG/Conn    
"Configurations;'"Data Source=XXXXXX;Initial Catalog=YYYY;Provider=SQLNCLI10.1;Integrated    
Security=SSPI;Auto Translate=False;'"" /SET    
"\Package.Variables[User::TargetEnvironmentId].Properties[Value]";"2"

If i take out connection string part it works fine but when i add

/Conn "Configurations;'"Data Source=XXXXXX;Initial Catalog=YYYY;Provider=SQLNCLI10.1;
Integrated Security=SSPI;Auto Translate=False;'""

This it throws exception and says INVALID

1 Answer 1

1

Is the name of your connection manager called "Configurations"? I can only assume that is the case. Give the following a try:

/CONNECTION "Configurations";"\"Data Source=XXXX;Initial Catalog=YYYY;Provider=SQLNCLI10.1;Integrated Security=SSPI;Auto Translate=False;\""

I always find it easier to use DTExecUI to create the script, have you tried doing that?

Either that or set the connection string as a variable and pass that through DTExec

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.