tag:blogger.com,1999:blog-5898028992635002784.post2474972334921194572..comments2023-12-11T00:43:13.821-08:00Comments on Sporadic Thoughts of a Software Developer: Setting dynamic connection string for dtexec.exe in PowershellAnonymoushttp://www.blogger.com/profile/08324908988641513796noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-5898028992635002784.post-86372767616891217382014-12-04T13:32:39.039-08:002014-12-04T13:32:39.039-08:00I built my argument in SSIS process task, but unfo...I built my argument in SSIS process task, but unfortunately, its not working. Could you please help.<br /><br /><br />My Argument:<br />----------------------<br />"/FILE \"" + @[User::entityStagePackage] + "\" /SET \\Package.Variables[User::controlCount].Properties[Value];\"" + (DT_WSTR,10) @[User::controlCount] + "\" /SET \\Package.Variables[User::fileID].Properties[Value];\"" + (DT_WSTR,10) @[User::fileID] + "\" /SET \\Package.Variables[User::filePathName].Properties[Value];\"" + @[User::filePathName] + "\"" + " /SET \\Package.Variables[User::archivePath].Properties[Value];\"" + @[User::entityArchivePath] + "\"" <br /><br />+ " /SET \\Package.Variables[User::stageID].Properties[Value];\"" + (DT_WSTR,10)@[User::stageID] + "\"" <br />+ " /SET \\Package.Variables[User::MasterExceptionPkg].Properties[Value];\"" + (DT_WSTR,100)@[User::MasterExceptionPkg] <br />+ "\"" + (DT_WSTR,500) @[User::iniVariable]<br /><br /><br />Evaluate Expression:<br />--------------------------<br />/FILE "" /SET \Package.Variables[User::controlCount].Properties[Value];"0" /SET \Package.Variables[User::fileID].Properties[Value];"23" /SET \Package.Variables[User::filePathName].Properties[Value];"" /SET \Package.Variables[User::archivePath].Properties[Value];"" /SET \Package.Variables[User::stageID].Properties[Value];"26" /SET \Package.Variables[User::MasterExceptionPkg].Properties[Value];""/Conn metaDBl; "Provider=SQLNCLI10; Server=147.191.62.44; Database=STAGE; Trusted_Connection=yes;"<br /><br />Error message:<br />-----------------<br />/Conn metaDB; "Provider=SQLNCLI10; Server=157.191.62.45; Database=OH_STAGE; Trusted_Connection=yes;"" at "", <br /><br />The process exit code was "6" while the expected was "0".tdai_devhttps://www.blogger.com/profile/17158818191408267981noreply@blogger.comtag:blogger.com,1999:blog-5898028992635002784.post-70274963003076467862013-03-28T21:40:17.634-07:002013-03-28T21:40:17.634-07:00I don't understand your question. The documen...I don't understand your question. The documentation for the dtexec utility is available at http://msdn.microsoft.com/en-us/library/ms162810%28v=sql.105%29.aspx, and it describes in there the exact format of the /Conn parameter. <br /><br />This post was really just focusing on how to get the syntax correct for PowerShell.Geoff McElhanonhttps://www.blogger.com/profile/07260343209030527699noreply@blogger.comtag:blogger.com,1999:blog-5898028992635002784.post-54850796252792174962013-03-26T23:55:35.171-07:002013-03-26T23:55:35.171-07:00I am unable to set connection string of a connecti...I am unable to set connection string of a connection manager using /CONN. Can you please share the complete procedure?Fahad Khalid Bhattihttps://www.blogger.com/profile/16861045967379562664noreply@blogger.com