将多个值从SQL Server代理传递到SSIS

时间:2015-07-15 20:57:55

标签: sql-server ssis

我需要将4个值从SQL Server代理作业传递到我的SSIS包中。 这是来自CommandLine的代码。

(为了便于阅读而增加了换行符)

/SQL "\"\DataWarehouse\Common\SSISPackageExecution\"" 
/SERVER "\"DEV-DS12\""  
/CHECKPOINTING OFF 
/SET "\"\Package.Variables[Control::SQLAgentJob].Value\"";"\"\"\"SSIS - Data Warehouse ETL\"\"\"" 
/SET "\"\Package.Variables[Control::Category].Value\"";"\"\"\"Dimension\"\"\"" 
/SET "\"\Package.Variables[Control::StartStep].Value\"";"\"\"\"10\"\"\"" 
/SET "\"\Package.Variables[Control::EndStep].Value\"";"\"\"\"20\\\"\"\"" 
/REPORTING E

我正在使用SQL Server 2014,SSMS 2014和VS 13以及2014 datatools

当我执行我的工作时,给我这个:  选项“ - ”无效。命令行参数无效。

我的物业路径是:

  • \ Package.Variables [控制:: SQLAgentJob]。价值
  • \ Package.Variables [控制::类别]。价值
  • \ Package.Variables [控制:: StartStep]。价值
  • \ Package.Variables [控制:: EndStep]。价值

我的价值观是:

  • “SSIS - 数据仓库ETL”
  • “维”
  • “10”
  • “20”

1 个答案:

答案 0 :(得分:1)

删除引用转义:

/SQL "\DataWarehouse\Common\SSISPackageExecution" 
/SERVER "DEV-DS12"  
/CHECKPOINTING OFF 
/SET "Package.Variables[Control::SQLAgentJob].Value";"SSIS - Data Warehouse ETL" 
/SET "Package.Variables[Control::Category].Value";"Dimension" 
/SET "Package.Variables[Control::StartStep].Value";"10" 
/SET "Package.Variables[Control::EndStep].Value";"20" 
/REPORTING E