对内存中 OLTP 的 SQL Server Integration Services 支持SQL Server Integration Services Support for In-Memory OLTP

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 是Azure SQL 数据库Azure SQL DatabaseYesAzure SQL 数据库Azure SQL Database适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 是Azure SQL 数据库Azure SQL DatabaseYesAzure SQL 数据库Azure SQL Database

你可以使用内存优化的表、引用内存优化表的视图或本机编译的存储过程作为你的 SQL ServerSQL ServerIntegration ServicesIntegration Services (SSIS) 包的源或目标。You can use a memory-optimized table, a view referencing memory-optimized tables, or a natively compiled stored procedure as the source or destination for your SQL ServerSQL ServerIntegration ServicesIntegration Services (SSIS) package. 你可以在 SSIS 包的数据流中使用 ADO NET 源OLE DB 源ODBC 源 并配置源组组件以便从内存优化的表或视图检索数据,或指定一个 SQL 语句来执行本机编译的存储过程。You can use ADO NET Source, OLE DB Source, or ODBC Source in the data flow of an SSIS package and configure the source component to retrieve data from a memory-optimized table or a view, or specify a SQL statement to execute a natively compiled stored procedure. 同样,你可以使用 ADO NET 目标OLE DB 目标ODBC 目标 将数据加载到内存优化的表或视图,或指定一个 SQL 语句来执行本机编译的存储过程。Similarly, you can use ADO NET Destination, OLE DB Destination, or ODBC Destination to load data into a memory-optimized table or a view, or specify a SQL statement to execute a natively compiled stored procedure.

您可以在 SSIS 包中配置上述的源和目标组件以从内存优化的表和视图中读取或写入它们,所用的方法与从其他 SQL ServerSQL Server 表和视图中读取或写入它们的方法相同。You can configure the above mentioned source and destination components in an SSIS package to read from/write to memory-optimized tables and views in the same way as with other SQL ServerSQL Server tables and views. 但是,在使用本机编译的存储过程时,需要注意下一节中的几个重要事项。However, you need to be aware of the important points in the following section when using natively compiled stored procedures.

从 SSIS 包调用本机编译的存储过程Invoking a natively compiled stored procedure from an SSIS Package

若要从 SSIS 包调用本机编译的存储过程,建议使用 ODBC 源或 ODBC 目标并使用以下格式的 SQL 语句:<procedure name>,不带 EXEC 关键字。To invoke a natively compiled stored procedure from an SSIS package, we recommend that you use an ODBC Source or ODBC Destination with an SQL statement of the format: <procedure name> without the EXEC keyword. 如果在 SQL 语句中使用 EXEC 关键字,您将看到错误消息,因为 ODBC 连接管理器将 SQL 命令文本解释为 Transact-SQLTransact-SQL 语句而非存储过程并使用游标,而执行本机编译的存储过程时不支持游标。If you use the EXEC keyword in the SQL statement, you will see an error message because the ODBC connection manager interprets the SQL command text as a Transact-SQLTransact-SQL statement rather than a stored procedure and use cursors, which are not supported for execution of natively compiled stored procedures. 连接管理器将没有 EXEC 关键字的 SQL 语句作为存储过程调用处理,将不使用游标。The connection manager treats the SQL statement without the EXEC keyword as a stored procedure call and will not use a cursor.

还可以使用 ADO .NET 源和 OLE DB 源来调用本机编译的存储过程,但是我们建议您使用 ODBC 源。You can also use ADO .NET Source and OLE DB Source to invoke a natively compiled stored procedure, but we recommend that you use ODBC Source. 如果您配置 ADO .NET 源以执行本机编译的存储过程,将看到错误消息,因为 ADO .NET 源默认使用的 SQL ServerSQL Server (SqlClient) 的数据访问接口不支持执行本机编译的存储过程。If you configure the ADO .NET Source to execute a natively compiled stored procedure, you will see an error message because the data provider for SQL ServerSQL Server (SqlClient), which the ADO .NET Source uses by default, does not support execution of natively compiled stored procedures. 您可以配置 ADO .NET 源以使用 ODBC 数据访问接口、用于 SQL ServerSQL Server的 OLE DB 访问接口或 SQL ServerSQL Server Native Client。You can configure the ADO .NET Source to use the ODBC Data Provider, OLE DB Provider for SQL ServerSQL Server, or SQL ServerSQL Server Native Client. 但是,请注意 ODBC 源的性能好于使用 ODBC 数据访问接口的 ADO .NET 源。However, note that the ODBC Source performs better than ADO .NET Source with ODBC Data Provider.

另请参阅See Also

SQL Server 对内存中 OLTP 的支持SQL Server Support for In-Memory OLTP