为什么是“使用环境变量"SSIS2012 目录配置中的选项已禁用/变灰? [英] Why is "Use environment variable" option disabled/grayed out in SSIS2012 catalog configuration?

查看:62
本文介绍了为什么是“使用环境变量"SSIS2012 目录配置中的选项已禁用/变灰?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这听起来像是一个简单的问题,但网络上的答案都指向设置环境并在项目/包中引用它的基础知识.

This may sound like an easy question but the answers on the net all point to the basics of setting up an environment and referencing it in the project/package.

我遇到的场景从未在任何地方提及,所以我认为最好在此处记录该行为.

The scenario that I have encountered was never mentioned anywhere so I thought it would be good to document the behaviour here.

以下是重现问题的步骤:
1.新建一个包:Package1.dtsx
2.新建(包)参数:Test, Int32, Required
3. 部署项目.
4. 转到集成服务目录并导航到包.
5. 右键单击​​包,然后配置...
6.点击包参数Test
旁边的..."7. 您将看到 使用环境变量" 选项已禁用/变灰.

Below is the steps to reproduce the problem:
1. Create a new package: Package1.dtsx
2. Create a new (package) parameter: Test, Int32, Required
3. Deploy the project.
4. Goto Integration Services Catalogs and navigate to the package.
5. Right click on the package and then Configure...
6. Click on "..." next to the package parameter Test
7. You will see that "Use environment variable" option is disabled/grayed out.

这是为什么?

推荐答案

现在来自博客和论坛的大多数答案都会说您需要创建一个环境并将其链接到包,等等,等等.然而,他们都没有提到这样一个事实,即为了启用该选项,您必须拥有具有匹配数据类型的变量!

Most answers from blogs and forums will now say that you need to create an environment and link it to the package, blah, blah. However, none of them mentions the fact that in order for the option to be enabled, you must have variables with MATCHING DATA TYPES!

请允许我演示.

  1. 创建环境:Demo
  2. 创建一个变量:Test, String
  3. 请注意,环境变量的数据类型与包参数不同.
  4. 将环境Demo链接到包Package1.dtsx
  5. 这是网上大多数答案停止的地方.如果到目前为止您已经完成了我告诉您的操作,您的 "Use environment variable 选项仍处于禁用/灰色显示状态.为什么?因为数据类型不匹配.重要事项- 变量名称不必匹配,只需匹配数据类型.
  6. 现在让我们完成它.返回环境并创建另一个 Int32 变量:Aha, Int32, 0
  7. 返回到配置...并单击包参数Test
  8. 旁边的..."
  9. 看到如何启用 使用环境变量" 选项?
  1. Create an environment: Demo
  2. Create a variable: Test, String
  3. Notice that the data type of the environment variable is different to the package paramter.
  4. Link the environment Demo to the package Package1.dtsx
  5. This is where most answers on the net stop. If you have done what I've told you to do up until now, your "Use environment variable option is still disabled/grayed out. Why? Because the data types are not matching. IMPORTANT - variable names don't have to match, only the data types.
  6. Now let's finish it. Go back to the environment and create another variable that's Int32: Aha, Int32, 0
  7. Go back to Configure... and click on "..." next to the package parameter Test
  8. See how the "Use environment variable" option is now enabled?

这篇关于为什么是“使用环境变量"SSIS2012 目录配置中的选项已禁用/变灰?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆