首页 > 解决方案 > 如何在 SSIS 作业步骤属性中使用环境文件

问题描述

创建了一个包并部署在 SQL Server 2017 上。我的包具有参数(包级别范围),并且希望在创建 SQL-JOB-STEP 时从环境文件中设置值。

我已经创建了环境文件并完美地定义了我的变量“Integration Services Categolog => SSISDB => MyProject => Environments”,并且可以在配置和执行时将这些变量分配给运行良好的包参数。

但是在创建 SQL-JOB 时我不能这样做。我可以在“步骤属性窗口”中看到有一个定位“环境”文件的选项,但是当我找到该文件时,我找不到将这些变量分配给我的包参数的方法。有人可以帮我吗?

请参考图片: 在此处输入图像描述

标签: sql-serverssissql-job

解决方案


Click the ellipses (...) besides the empty Value spot. There you will be presented with three options (if you didn't have an Environment established, there'd be only two).

The design time value is the default here. If your parameter, MyVar01_PackageLevel, had an actual value displayed, the UI would render it in the default font weight/style.

One row above is a manual override radio button and here you can just hard code the value. Doing this will result in the Value displayed to be in bold

One row below the design time value is where you can associate a parameter to a list of parameter values from your Environment. Scroll through the list of values, which are in no discernible order, and find the target property name. Let's call it V01_PL After selecting that, the above will indicate V01_PL in an italicized font. It won't show the value of V01_PL mind you, it'll just tell you it's driven the configured value.


推荐阅读