ssis 表达式任务
In this article, I will give an overview of Execute SQL Task in SSIS and I will try to illustrate some of the differences between writing an expression to evaluate SqlStatementSource property or writing this expression within a variable and change the Execute SQL Task Source Type to variable.
在本文中,我将概述SSIS中的Execute SQL Task,并尝试说明在编写表达式以评估SqlStatementSource属性或在变量中编写此表达式并将Execute SQL Task Source Type更改为变量之间的一些区别。 。
This article is the fourth article in the SSIS feature face to face series which aims to remove confusion and to illustrate some of the differences between similar features provided by SQL Server Integration Services.
本文是SSIS功能面对面系列文章中的第四篇,旨在消除混淆并说明SQL Server Integration Services提供的相似功能之间的某些区别。
执行SQL任务 (Execute SQL Task)
From the SSIS toolbox item description, Execute SQL Task in SSIS is used to execute SQL statements or stored procedures in a relational database.
在SSIS工具箱项描述中,SSIS中的“执行SQL任务”用于在关系数据库中执行SQL语句或存储过程。
Figure 1 – Execute SQL Task description
图1 –执行SQL任务描述
The SQL statement can be a:
SQL语句可以是:
- Single SQL Command 单个SQL命令
- Multiple SQL Commands 多个SQL命令
- Stored procedure 存储过程
Figure 2 – Execute SQL Task in SSIS
图2 –在SSIS中执行SQL任务
This Task need a connection manager to establish a connection with a data source and it supports several data sources other than SQL Server since it can use the following connection managers:
此任务需要连接管理器来建立与数据源的连接,并且它支持SQL Server以外的其他数据源,因为它可以使用以下连接管理器:
- Excel: An Excel connection manager enables a package to connect to a Microsoft Excel workbook file Excel: Excel连接管理器使程序包可以连接到Microsoft Excel工作簿文件
- OLE DB: An OLE DB connection manager enables a package to connect to a data source by using an OLE DB provider OLE DB: OLE DB连接管理器使程序包可以使用OLE DB提供程序连接到数据源
- ODBC: An ODBC connection manager enables a package to connect to a variety of database management systems using the Open Database Connectivity specification (ODBC) ODBC: ODBC连接管理器使程序包可以使用开放数据库连接规范(ODBC)连接到各种数据库管理系统
- ADO: An ADO connection manager enables a package to connect to ActiveX Data Objects (ADO) objects, such as a recordset ADO: ADO连接管理器使程序包可以连接到ActiveX数据对象(ADO)对象,例如记录集
- ADO.NET: An ADO.NET connection manager enables a package to access data sources by using a .NET provider ADO.NET:ADO.NET连接管理器使程序包可以使用.NET提供程序访问数据