SSIS Parameter用法
今天学习SSISParameter的用法,记录学习的过程。
Parameters能够在Project Deployment Model下使用,不能在Package Deployment Model使用。在Package Deployment Model下,使用Package Configurations来传递属性值;在Project Deployment Model下,使用Parameters来传递值。
1,Parameters and Package Deployment Model
In general, if you are deploying a package using the package deployment model, you should use configurations instead of parameters.
When you deploy a package that contains parameters using the package deployment model and then execute the package, the parameters are not called during execution. If the package contains package parameters and expressions within the package use the parameters, the resulting values are applied at runtime. If the package contains project parameters, the package execution may fail.
2,Parameters分为两个Level,Project Level 和 Package Level,这两个level的parameters value都存储在project files。
Project Parameters values and Packages parameters values are stored in configurations in the project file。
Integration Services (SSIS) parameters allow you to assign values to properties within packages at the time of package execution. You can create project parameters at the project level and package parameters at the package level. Project parameters are used to supply any external input the project receives to one or more packages in the project. Package parameters allow you to modify package execution without having to edit and redeploy the package.
一,Package Parameter
1,在Project Deployment Model下,打开parameters选项卡,New一个Package Parameter,Parameter 名字是ParameterA。
Sensitive:敏感信息,需要加密
Required:必须提供,否则会出错
Property |
Description |
---|---|
Name |
The name of the parameter. |
Data type |
The data type of the parameter. |
Default value |
The default value for the parameter assigned at design time. This is also known as the design default. |
Sensitive |
Sensitive parameter values are encrypted in the catalog and appear as a NULL value when viewed with Transact-SQL or SQL Server Management Studio. |
Required |
Requires that a value, other than the design default, is specified before the package can execute. |
Description |
For maintainability, the description of the parameter. In SQL Server Data Tools (SSDT), set the parameter description in the Visual Studio Properties window when the parameter is selected in the applicable parameters window. |
2,Add parameters to Configurations
3,Set Parameter Values After the Project Is Deployed
The Deployment Wizard allows you to set server default parameter values when you deploy your project to the catalog. After your project is in the catalog, you can use SQL Server Management Studio (SSMS) Object Explorer or Transact-SQL to set server default values.
To set server defaults with SSMS Object Explorer:
Select and right-click the project under the Integration Services node.
Click Properties to open the Project Properties dialog window.
Open the parameters page by clicking Parameters under Select a page.
Select the desired parameter in the Parameters list. Note: The Container column helps distinguish project parameters from package parameters.
In the Value column, specify the desired server default parameter value.
To set server defaults with Transact-SQL, use the catalog.set_object_parameter_value (SSISDB Database) stored procedure. To view current server defaults, query the catalog.object_parameters (SSISDB Database) view. To clear a server default value, use the catalog.clear_object_parameter_value (SSISDB Database) stored procedure.
MSDN上提供两种方法,一种是使用SSMS来修改,一种是使用TSQL语句来修改
3.1 使用SSMS来修改
选中integration Services Catalogs,右键点击TestISProjects,打开Configure
点击... 来设置参数的值
二,Project Parameter
1,在Project视图下,打开Project.params,创建一个project level 的Parameter, 命名为ProjectParameter_A。
2,将Project Parameter 添加到configurations中,
3,发布到Sql server之后,修改Project parameter的default value。
三,Use of package and project parameters
Parameters are useful for providing runtime values to properties during a package execution. Hence, in a way they replace the concept of configurations that we had for SSIS packages.
Package parameters are useful for providing values to specific package executions. As they are package scope, they would only be available to the package in which they were created.
Project parameters are available to all the packages in a project. They are useful for configuring values which can be shared between packages. For instance if you wanted to have a single parameter containing a server name to be used by multiple packages, then Project Parameters will be useful for you.
You can use a parameter anywhere in an expression by referring it using the following syntax:
@[$<<Project/Package>>::<<ParameterName>>]
The evaluation order is similar to using a variable in an expression and then executing a package. Hence, the value gets evaluated and assigned to the property at Validation phase.
参考文档:
https://msdn.microsoft.com/en-us/library/hh213214.aspx
https://msdn.microsoft.com/en-us/library/hh213293.aspx
http://blogs.msdn.com/b/mattm/archive/2011/07/16/configuring-projects-and-packages-using-parameters.aspx
SSIS Parameter用法的更多相关文章
- SSIS ->> Parameter
参数只能外部调用 参数分项目级别的参数和包级别的参数.项目级别的参数可见范围是所有包,而包级别的参数可见范围仅限于该包内. Sensitive选项是加密数据值,这样在Integration Servi ...
- 效率最高的Excel数据导入---(c#调用SSIS Package将数据库数据导入到Excel文件中【附源代码下载】) 转
效率最高的Excel数据导入---(c#调用SSIS Package将数据库数据导入到Excel文件中[附源代码下载]) 本文目录: (一)背景 (二)数据库数据导入到Excel的方法比较 ...
- .net 码农转战 iOS - 初探
好久没写博客了,之前还打算把毕业设计中涉及到的两个算法拿出来说说(脸型分析 + 声音分析),博文都写了一半了,后来实在太忙了,那篇随笔也就沉在草稿列表中没动过. 我原先是专职 .net 开发的,在公司 ...
- Lambda根据属性名字选择或筛选
using System; using System.Linq.Expressions; internal class LambdaHelper { /// <summary> /// 指 ...
- Oracle 常用函数大全
Oracle 11g 常用函数(Functions)详解 目录 ABS. 3 ACOS. 3 ADD_MONTHS. 4 ASCII 4 ASCIISTR. 5 ASIN.. 5 ATAN.. 5 A ...
- Projected coordinate systems 和 wkid
Projected coordinate systems Well-known ID Name Well-known text 2000 Anguilla_1957_British_West_Indi ...
- SSIS Execute SQL Task 用法
Execute Sql Task组件是一个非常有用的Control Flow Task,可以直接执行SQL语句,例如,可以执行数据更新命令(update,delete,insert),也可以执行sel ...
- SSIS的CheckPoint用法
在SSIS的Package Property中有CheckPoints的属性目录,CheckPoint是SSIS的Failover Feature.通过简单的配置CheckPoint,能够在Packa ...
- DAX/PowerBI系列 - 查询参数用法详解(Query Parameter)
PowerBI - 查询参数用法详解(Query Parameter) 很多人都不知道查询参数用来干啥,下面总结一下日常项目中常用的几个查询参数的地方.(本人不太欢hardcode的东西) 使用查询 ...
随机推荐
- [R]R语言中的%>%和%.%
最近在网上看R的代码,常常看到 x %>% y 的写法. 样子看着像是pipe的用法,搜了一下, 没找到语法的相关说明. 今天突然开窍,想着 %>% 可能不是语言本身支持的语法,可能是某个 ...
- html设置透明度
在html中,设置元素的透明度 在css相应元素中添加下面两行代码即可. filter:alpha(opacity=50); /*仅在ie中支持*/ opacity:0.5; /*不支持ie*/ op ...
- Flask_more1
#DB ``` import os basedir = os.path.abspath(os.path.dirname(__file__)) SQLALCHEMY_DATABASE_URI = ' ...
- SSH私钥取消密码(passphrase )
1. 使用openssl命令去掉私钥的密码 openssl rsa -in ~/.ssh/id_rsa -out ~/.ssh/id_rsa_new 2. 备份旧私钥 mv ~/.ssh/id_rsa ...
- C# SQL 面试题自我总结
1,asp.net单点登录机制 2,多线程同步机制 3,写一个冒泡排序算法 4,写一个递归算法 5,字符串反转 字符串分隔后调用reverse 方法. 6,sql 中ID自动增长,查询31到40条记录 ...
- jmobile学习之路 ---- 视口
当我们的浏览器在窗口最大化的时候,此时屏幕的宽度,就是我们桌面的分辨率.这个规则仅仅适用于PC! 我们试图在iPhone中输出屏幕宽度,你会发现屏幕宽度是980!居然和PC屏幕差不多大! 苹果主导的这 ...
- 使用 Graphviz 画拓扑图
使用 Graphviz 画拓扑图 0)前述 本文着重讲一下 Graphviz 的风格控制,基础一些的就不在这里讲啦. graphviz 的主页是http://www.graphviz.org/. Gr ...
- 一台linux真实机实现多台Tomcat服务
一.事前准备 ü 确保linux并未安装tomcat (这里虚拟机测试) ü 下载jdk与tomcat ① jdk-6u18-ea-bin-b01-linux-i586-20_aug_2009.bin ...
- [LeetCode]444. Sequence Reconstruction
Check whether the original sequence org can be uniquely reconstructed from the sequences in seqs. Th ...
- 省市县三级联动(jqurey+json)
1.效果图 2.联动js /** * jquery.choosearea.js - 地区联动封装 */ ; (function ($) { var choosearea = function (opt ...