简体   繁体   English

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

[英]Passing multiple values from SQL Server Agent to SSIS

I have 4 values that I need to pass from a SQL server Agent Job into my SSIS package. 我需要从SQL Server代理作业传递到SSIS包中的4个值。 Here is my code from the CommandLine. 这是我在命令行中的代码。

(line breaks added for readability) (添加了换行符以提高可读性)

/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

I am working with SQL Server 2014, SSMS 2014, and VS 13 with 2014 datatools 我正在使用SQL Server 2014,SSMS 2014和VS 13以及2014 datatools

When I execute my Job is gives me this: Option "-" is not valid. 当我执行我的工作时,这是给我的:选项“-”无效。 The command line parameters are invalid. 命令行参数无效。

My Property Paths are: 我的财产路径是:

  • \\Package.Variables[Control::SQLAgentJob].Value \\ Package.Variables [Control :: SQLAgentJob] .Value
  • \\Package.Variables[Control::Category].Value \\ Package.Variables [Control :: Category] ​​.Value
  • \\Package.Variables[Control::StartStep].Value \\ Package.Variables [Control :: StartStep] .Value
  • \\Package.Variables[Control::EndStep].Value \\ Package.Variables [Control :: EndStep] .Value

My Values are: 我的价值观是:

  • "SSIS - Data Warehouse ETL" “ SSIS-数据仓库ETL”
  • "Dimension" “尺寸”
  • "10" “ 10”
  • "20" “ 20”

Remove the quote escaping: 删除引号转义:

/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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM