使用cmd在包中传递输入参数时出错
Getting error while passing input parameter in package using cmd
以下是我的命令。我用了5个参数。
dtexec.exe /FILE "D:\Share\CRM#96012 - SSIS Package Live to Tr-28_08_2019\Move_live_to_training_Object\Move_live_to_training_Object\Live_To_Training_Db_Objects.dtsx"
/SET \Package.Variables[User::DesDBName].Properties[Value];"FireTrMJ"
/SET \Package.Variables[User::Password].Properties[Value];"Pnx@2017"
/SET \Package.Variables[User::ServerName].Properties[Value];"192.168.10.157"
/SET \Package.Variables[User::SourceDBName].Properties[Value];"FireLiveMJ"
/SET \Package.Variables[User::UserName].Properties[Value];"sa"
我收到错误消息
"/SET \Package.Variables[User::DesDBName].Properties[Value];"FireTrMJ"
'/SET' is not recognized as an internal or external command,
operable program or batch file."
我认为您需要在脚本中使用 ^
转义 EOL 字符
dtexec.exe /FILE "D:\Share\CRM#96012 - SSIS Package Live to Tr-28_08_2019\Move_live_to_training_Object\Move_live_to_training_Object\Live_To_Training_Db_Objects.dtsx" ^
/SET \Package.Variables[User::DesDBName].Properties[Value];"FireTrMJ" ^
/SET \Package.Variables[User::Password].Properties[Value];"Pnx@2017" ^
/SET \Package.Variables[User::ServerName].Properties[Value];"192.168.10.157" ^
/SET \Package.Variables[User::SourceDBName].Properties[Value];"FireLiveMJ" ^
/SET \Package.Variables[User::UserName].Properties[Value];"sa"
以下是我的命令。我用了5个参数。
dtexec.exe /FILE "D:\Share\CRM#96012 - SSIS Package Live to Tr-28_08_2019\Move_live_to_training_Object\Move_live_to_training_Object\Live_To_Training_Db_Objects.dtsx"
/SET \Package.Variables[User::DesDBName].Properties[Value];"FireTrMJ"
/SET \Package.Variables[User::Password].Properties[Value];"Pnx@2017"
/SET \Package.Variables[User::ServerName].Properties[Value];"192.168.10.157"
/SET \Package.Variables[User::SourceDBName].Properties[Value];"FireLiveMJ"
/SET \Package.Variables[User::UserName].Properties[Value];"sa"
我收到错误消息
"/SET \Package.Variables[User::DesDBName].Properties[Value];"FireTrMJ"
'/SET' is not recognized as an internal or external command,
operable program or batch file."
我认为您需要在脚本中使用 ^
转义 EOL 字符
dtexec.exe /FILE "D:\Share\CRM#96012 - SSIS Package Live to Tr-28_08_2019\Move_live_to_training_Object\Move_live_to_training_Object\Live_To_Training_Db_Objects.dtsx" ^
/SET \Package.Variables[User::DesDBName].Properties[Value];"FireTrMJ" ^
/SET \Package.Variables[User::Password].Properties[Value];"Pnx@2017" ^
/SET \Package.Variables[User::ServerName].Properties[Value];"192.168.10.157" ^
/SET \Package.Variables[User::SourceDBName].Properties[Value];"FireLiveMJ" ^
/SET \Package.Variables[User::UserName].Properties[Value];"sa"