Update only connection information in ssis package
Hi, I have created ssis package from code itself setting both source connection string and destination connection string also some other stuff in it. It works fine. But now I want to set diff. source connection string in ssis package like DBname, userid, password keeping other information as it is in run-time in code.can I update only source connection string in ssis package? Please help...
November 25th, 2011 2:54pm

You can change it with the /Conn option in DTExec when you execute it.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
November 25th, 2011 3:17pm

But I do not want to execute,I just want to change source connection string in package.Do i need to load package from database in code and set source connection string and save in database then finally execute.Please provide code sample if passible.
November 25th, 2011 3:48pm

This MSDN article has it: http://msdn.microsoft.com/en-us/library/ms136093.aspxArthur My Blog
Free Windows Admin Tool Kit Click here and download it now
November 25th, 2011 4:05pm

To update an existing connectionString it's the same on how you set the variables ssisPackage.Variables["<YourConnectionString>"].Value = "Data Source=<Server>;User ID=<UserID>;Password=<Pwd>; Initial Catalog=<Catalog>" + ";Provider=SQLNCLI10.1;"; Note: - The provider is important, the value of it depends on the connection manager you are using see ArthurZ's posted url. - When using Integrated Security use Integrated Security=SSPI instead of Integrated Security=true. Randy Aldrich Paulo MCTS(BizTalk 2010/2006,WCF NET4.0), MCPD | My Blog BizTalk Message Archiving - SQL and File
November 26th, 2011 1:24am

Check these articles on how to get the connection string dynamicaly which will help you to do some dynamic connections without changing the connection string frequently. http://beyondrelational.com/blogs/sudeep/archive/2009/11/19/dynamic-file-connection-in-ssis.aspxThanks Karthikeyan Anbarasan www.f5debug.net Free Ebook on SSIS Tutorial - Download here SSIS Step by Step
Free Windows Admin Tool Kit Click here and download it now
November 28th, 2011 2:20am

Also check this link for dynamic flat file connection manager options http://beyondrelational.com/blogs/sudeep/archive/2010/03/14/dynamically-set-flat-file-connection-manager.aspxThanks Karthikeyan Anbarasan www.f5debug.net Free Ebook on SSIS Tutorial - Download here SSIS Step by Step
November 28th, 2011 2:20am

Check this for passing connection string as parameter to use it within the package http://beyondrelational.com/blogs/alpeshpatel/archive/2011/08/11/passing-parameters-to-ssis-package.aspxThanks Karthikeyan Anbarasan www.f5debug.net Free Ebook on SSIS Tutorial - Download here SSIS Step by Step
Free Windows Admin Tool Kit Click here and download it now
November 28th, 2011 2:21am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics