在 Azure 数据工厂中创建 Azure-SSIS 集成运行时Create an Azure-SSIS integration runtime in Azure Data Factory

适用于:是 Azure 数据工厂否 Azure Synapse Analytics(预览版)APPLIES TO: yesAzure Data Factory noAzure Synapse Analytics (Preview)

本文提供了在 Azure 数据工厂 (ADF) 中预配 Azure-SQL Server Integration Services (SSIS) 集成运行时 (IR) 的步骤。This article provides steps for provisioning an Azure-SQL Server Integration Services (SSIS) integration runtime (IR) in Azure Data Factory (ADF). Azure-SSIS IR 支持:An Azure-SSIS IR supports:

  • 运行部署在由 Azure SQL 数据库服务器/托管实例托管的 SSIS 目录 (SSISDB) 中的包(项目部署模型)Running packages deployed into SSIS catalog (SSISDB) hosted by Azure SQL Database server/Managed Instance (Project Deployment Model)
  • 运行部署在由 Azure SQL 托管实例托管的文件系统、Azure 文件存储或 SQL Server 数据库 (MSDB) 中的包(包部署模型)Running packages deployed into file system, Azure Files, or SQL Server database (MSDB) hosted by Azure SQL Managed Instance (Package Deployment Model)

预配 Azure-SSIS IR 后,可以使用熟悉的工具在 Azure 中部署和运行包。After an Azure-SSIS IR is provisioned, you can use familiar tools to deploy and run your packages in Azure. 这些工具包括 SQL Server Management Studio (SSMS) 和命令行实用工具,例如 dtutilAzureDTExecThese tools are SQL Server Management Studio (SSMS), and command-line utilities like dtutil and AzureDTExec.

预配 Azure-SSIS IR 教程介绍了如何通过 Azure 门户或数据工厂应用创建 Azure-SSIS IR。The Provisioning Azure-SSIS IR tutorial shows how to create an Azure-SSIS IR via the Azure portal or the Data Factory app. 该教程还介绍了如何选择性地使用 Azure SQL 数据库服务器或托管实例来承载 SSISDB。The tutorial also shows how to optionally use an Azure SQL Database server or managed instance to host SSISDB. 本文对该教程的基础上有所延伸,介绍如何执行以下可选任务:This article expands on the tutorial and describes how to do these optional tasks:

  • 使用包含 IP 防火墙规则/虚拟网络服务终结点的 Azure SQL 数据库服务器来承载 SSISDB。Use an Azure SQL Database server with IP firewall rules/virtual network service endpoints to host SSISDB. 作为先决条件,需要配置虚拟网络权限和设置,才能让 Azure-SSIS IR 加入虚拟网络。As a prerequisite, you need to configure virtual network permissions and settings for your Azure-SSIS IR to join a virtual network.

  • 对数据工厂的托管标识使用 Azure Active Directory (Azure AD) 身份验证,以连接到 Azure SQL 数据库服务器或托管实例。Use Azure Active Directory (Azure AD) authentication with the managed identity for your data factory to connect to an Azure SQL Database server or managed instance. 作为先决条件,需要将数据工厂的托管标识添加为可创建 SSISDB 实例的数据库用户。As a prerequisite, you need to add the managed identity for your data factory as a database user who can create an SSISDB instance.

  • 将 Azure-SSIS IR 加入虚拟网络,或将自承载 IR 配置为代理,使 Azure-SSIS IR 能够访问本地数据。Join your Azure-SSIS IR to a virtual network, or configure a self-hosted IR as proxy for your Azure-SSIS IR to access data on-premises.

本文将介绍如何使用 Azure 门户、Azure PowerShell 和 Azure 资源管理器模板来预配 Azure-SSIS IR。This article shows how to provision an Azure-SSIS IR by using the Azure portal, Azure PowerShell, and an Azure Resource Manager template.

先决条件Prerequisites

备注

本文进行了更新,以便使用新的 Azure PowerShell Az 模块。This article has been updated to use the new Azure PowerShell Az module. 你仍然可以使用 AzureRM 模块,至少在 2020 年 12 月之前,它将继续接收 bug 修补程序。You can still use the AzureRM module, which will continue to receive bug fixes until at least December 2020. 若要详细了解新的 Az 模块和 AzureRM 兼容性,请参阅新 Azure Powershell Az 模块简介To learn more about the new Az module and AzureRM compatibility, see Introducing the new Azure PowerShell Az module. 有关 Az 模块安装说明,请参阅安装 Azure PowerShellFor Az module installation instructions, see Install Azure PowerShell.

  • Azure 订阅Azure subscription. 如果没有订阅,可以创建一个 1 元试用帐户。If you don't already have a subscription, you can create a 1rmb trial account.

  • Azure SQL 数据库服务器或 SQL 托管实例(可选)。Azure SQL Database server or SQL Managed Instance (optional). 如果还没有数据库服务器或托管实例,请在启动之前在 Azure 门户中创建一个。If you don't already have a database server or managed instance, create one in the Azure portal before you get started. 数据工厂进而会在此数据库服务器上创建一个 SSISDB 实例。Data Factory will in turn create an SSISDB instance on this database server.

    建议在集成运行时所在的同一 Azure 区域中创建数据库服务器或托管实例。We recommend that you create the database server or managed instance in the same Azure region as the integration runtime. 此配置允许集成运行时将执行日志写入 SSISDB 而无需跨 Azure 区域。This configuration lets the integration runtime write execution logs into SSISDB without crossing Azure regions.

    请记住以下几点:Keep these points in mind:

    • 系统可以代表你创建 SSISDB 实例作为单一数据库、创建此实例作为弹性池的一部分,或者在托管实例中创建。The SSISDB instance can be created on your behalf as a single database, as part of an elastic pool, or in a managed instance. 可以在公用网络中访问或者通过加入虚拟网络来访问该实例。It can be accessible in a public network or by joining a virtual network. 有关在 SQL 数据库与 SQL 托管实例之间进行选择以托管 SSISDB 的指导,请参阅本文中的比较 SQL 数据库与 SQL 托管实例部分。For guidance in choosing between SQL Database and SQL Managed Instance to host SSISDB, see the Compare SQL Database and SQL Managed Instance section in this article.

      如果使用包含 IP 防火墙规则/虚拟网络服务终结点的 Azure SQL 数据库服务器来承载 SSISDB,或者需要在未配置自承载 IR 的情况下访问本地数据,则需要将 Azure-SSIS IR 加入虚拟网络。If you use an Azure SQL Database server with IP firewall rules/virtual network service endpoints to host SSISDB, or if you require access to on-premises data without configuring a self-hosted IR, you need to join your Azure-SSIS IR to a virtual network. 有关详细信息,请参阅将 Azure-SSIS IR 加入虚拟网络For more information, see Join an Azure-SSIS IR to a virtual network.

    • 确认为数据库服务器启用了“允许访问 Azure 服务”设置。Confirm that the Allow access to Azure services setting is enabled for the database server. 使用包含 IP 防火墙规则/虚拟网络服务终结点的 Azure SQL 数据库服务器来承载 SSISDB 时,此设置不适用。This setting is not applicable when you use an Azure SQL Database server with IP firewall rules/virtual network service endpoints to host SSISDB. 有关详细信息,请参阅保护 Azure SQL 数据库的安全For more information, see Secure Azure SQL Database. 若要通过 PowerShell 来启用此设置,请参阅 New-AzSqlServerFirewallRuleTo enable this setting by using PowerShell, see New-AzSqlServerFirewallRule.

    • 将客户端计算机的 IP 地址或一系列包括客户端计算机 IP 地址的 IP 地址添加到数据库服务器的防火墙设置中的客户端 IP 地址列表。Add the IP address of the client machine, or a range of IP addresses that includes the IP address of the client machine, to the client IP address list in the firewall settings for the database server. 有关详细信息,请参阅 Azure SQL 数据库服务器级和数据库级防火墙规则For more information, see Azure SQL Database server-level and database-level firewall rules.

    • 若要连接到数据库服务器,可以结合服务器管理员凭据使用 SQL 身份验证,或者结合数据工厂的托管标识使用 Azure AD 身份验证。You can connect to the database server by using SQL authentication with your server admin credentials, or by using Azure AD authentication with the managed identity for your data factory. 对于后者,需将数据工厂的托管标识添加到有权访问数据库服务器的 Azure AD 组中。For the latter, you need to add the managed identity for your data factory into an Azure AD group with access permissions to the database server. 有关详细信息,请参阅为 Azure-SSIS IR 启用 Azure AD 身份验证For more information, see Enable Azure AD authentication for an Azure-SSIS IR.

    • 确认你的数据库服务器还没有 SSISDB 实例。Confirm that your database server does not have an SSISDB instance already. 预配 Azure-SSIS IR 时不支持使用现有的 SSISDB 实例。The provisioning of an Azure-SSIS IR does not support using an existing SSISDB instance.

  • Azure 资源管理器虚拟网络(可选)Azure Resource Manager virtual network (optional). 如果下列条件中至少有一个属实,则必须配置 Azure 资源管理器虚拟网络:You must have an Azure Resource Manager virtual network if at least one of the following conditions is true:

    • 在包含 IP 防火墙规则/虚拟网络服务终结点的 Azure SQL 数据库服务器上承载 SSISDB。You're hosting SSISDB on an Azure SQL Database server with IP firewall rules/virtual network service endpoints.

    • 需要从 SSIS 包连接到本地据存储,该包运行在没有配置自承载 IR 的 Azure-SSIS IR 上。You want to connect to on-premises data stores from SSIS packages running on your Azure-SSIS IR without configuring a self-hosted IR.

  • Azure PowerShell(可选)Azure PowerShell (optional). 若要运行 PowerShell 脚本来预配 Azure-SSIS IR,请按照如何安装和配置 Azure PowerShell 中的说明进行操作。Follow the instructions in How to install and configure Azure PowerShell, if you want to run a PowerShell script to provision your Azure-SSIS IR.

区域支持Regional support

有关提供数据工厂和 Azure-SSIS IR 的 Azure 区域列表,请参阅数据工厂和 SSIS IR 在各区域的上市情况For a list of Azure regions in which Data Factory and an Azure-SSIS IR are available, see Data Factory and SSIS IR availability by region.

比较 SQL 数据库和 SQL 托管实例Comparison of SQL Database and SQL Managed Instance

下表比较了 Azure SQL 数据库服务器和 SQL 托管实例与 Azure-SSIR IR 相关的某些功能:The following table compares certain features of an Azure SQL Database server and SQL Managed Instance as they relate to Azure-SSIR IR:

功能Feature SQL 数据库SQL Database SQL 托管实例SQL Managed instance
计划Scheduling SQL Server 代理不可用。The SQL Server Agent is not available.

请参阅在数据工厂管道中计划包执行See Schedule a package execution in a Data Factory pipeline.
可以使用托管实例代理。The Managed Instance Agent is available.
身份验证Authentication 可以使用包含的数据库用户创建 SSISDB 实例。该用户是 db_owner 角色的成员,代表具有数据工厂托管标识的任意 Azure AD 组。You can create an SSISDB instance with a contained database user who represents any Azure AD group with the managed identity of your data factory as a member in the db_owner role.

请参阅在 Azure SQL 数据库服务器中启用 Azure AD 身份验证以创建 SSISDBSee Enable Azure AD authentication to create an SSISDB in Azure SQL Database server.
可以使用代表数据工厂托管标识的包含的数据库用户创建 SSISDB 实例。You can create an SSISDB instance with a contained database user who represents the managed identity of your data factory.

请参阅在 Azure SQL 托管实例中启用 Azure AD 身份验证以创建 SSISDBSee Enable Azure AD authentication to create an SSISDB in Azure SQL Managed Instance.
服务层Service tier 在 Azure SQL 数据库服务器上创建 Azure-SSIS IR 时,可以选择 SSISDB 的服务层级。When you create an Azure-SSIS IR with your Azure SQL Database server, you can select the service tier for SSISDB. 有多个服务层级。There are multiple service tiers. 在托管实例上创建 Azure-SSIS IR 时,无法选择 SSISDB 的服务层级。When you create an Azure-SSIS IR with your managed instance, you can't select the service tier for SSISDB. 托管实例上的所有数据库共享分配给该实例的相同资源。All databases in your managed instance share the same resource allocated to that instance.
虚拟网络Virtual network 如果使用具有 IP 防火墙规则/虚拟网络服务终结点的 Azure SQL 数据库服务器,则 Azure-SSIS IR 可以加入 Azure 资源管理器虚拟网络。Your Azure-SSIS IR can join an Azure Resource Manager virtual network if you use an Azure SQL Database server with IP firewall rules/virtual network service endpoints. 不支持。Not supported.
分布式事务Distributed transactions 通过弹性事务支持此功能。This feature is supported through elastic transactions. 不支持 Microsoft 分布式事务处理协调器 (MSDTC) 事务。Microsoft Distributed Transaction Coordinator (MSDTC) transactions are not supported. 如果 SSIS 包使用 MSDTC 协调分布式事务,请考虑迁移到 Azure SQL 数据库弹性事务。If your SSIS packages use MSDTC to coordinate distributed transactions, consider migrating to elastic transactions for Azure SQL Database. 有关详细信息,请参阅跨云数据库的分布式事务For more information, see Distributed transactions across cloud databases. 不支持。Not supported.

使用 Azure 门户创建集成运行时Use the Azure portal to create an integration runtime

在本部分,你将使用 Azure 门户(具体而言,使用数据工厂用户界面 (UI) 或应用)创建 Azure-SSIS IR。In this section, you use the Azure portal, specifically the Data Factory user interface (UI) or app, to create an Azure-SSIS IR.

创建数据工厂Create a data factory

若要通过 Azure 门户创建数据工厂,请按照通过 UI 创建数据工厂中的分步说明操作。To create your data factory via the Azure portal, follow the step-by-step instructions in Create a data factory via the UI. 执行此操作时,请选择“固定到仪表板”,以便在创建后能够快速访问数据工厂。Select Pin to dashboard while doing so, to allow quick access after its creation.

创建数据工厂后,在 Azure 门户中打开其概述页。After your data factory is created, open its overview page in the Azure portal. 选择“创建和监视”磁贴,在单独的选项卡中打开该数据工厂的“开始”页。 然后可以继续创建 Azure-SSIS IR。Select the Author & Monitor tile to open its Let's get started page on a separate tab. There, you can continue to create your Azure-SSIS IR.

预配 Azure-SSIS 集成运行时Provision an Azure-SSIS integration runtime

在“入门”页中,选择“配置 SSIS Integration Runtime”磁贴以打开“集成运行时设置”窗格。 On the Let's get started page, select the Configure SSIS Integration Runtime tile to open the Integration runtime setup pane.

“配置 Azure SSIS 集成运行时”磁贴

“集成运行时设置”窗格中有三个页面,在其中可以连续配置常规设置、部署设置和高级设置。The Integration runtime setup pane has three pages where you successively configure general, deployment, and advanced settings.

“常规设置”页General settings page

在“集成运行时设置”窗格的“常规设置”页中完成以下步骤 。On the General settings page of Integration runtime setup pane, complete the following steps.

常规设置

  1. 对于“名称”,请输入集成运行时的名称。For Name, enter the name of your integration runtime.

  2. 对于“说明”,请输入集成运行时的说明。For Description, enter the description of your integration runtime.

  3. 对于“位置”,请选择集成运行时的位置。For Location, select the location of your integration runtime. 界面上仅显示支持的位置。Only supported locations are displayed. 建议选择承载 SSISDB 所需的数据库服务器的位置。We recommend that you select the same location of your database server to host SSISDB.

  4. 对于“节点大小”,请选择集成运行时群集中的节点大小。For Node Size, select the size of the node in your integration runtime cluster. 仅显示支持的节点大小。Only supported node sizes are displayed. 如果需要运行多个计算密集型或内存密集型包,请选择较大的节点大小(纵向扩展)。Select a large node size (scale up) if you want to run many compute-intensive or memory-intensive packages.

  5. 对于“节点数”,请选择集成运行时群集中的节点数。For Node Number, select the number of nodes in your integration runtime cluster. 仅显示支持的节点数。Only supported node numbers are displayed. 如果需要并行运行多个包,请选择包含许多节点的大型群集(横向扩展)。Select a large cluster with many nodes (scale out) if you want to run many packages in parallel.

  6. 对于“版本/许可证”,请选择集成运行时的 SQL Server 版本:“标准”或“企业”。For Edition/License, select the SQL Server edition for your integration runtime: Standard or Enterprise. 如果需要在集成运行时上使用高级功能,请选择“Enterprise”。Select Enterprise if you want to use advanced features on your integration runtime.

  7. 对于“节省资金”,请选择适用于集成运行时的“Azure 混合权益”选项:“是”或“否”。 For Save Money, select the Azure Hybrid Benefit option for your integration runtime: Yes or No. 如果需要自带具有软件保障的 SQL Server 许可证,以便充分利用使用混合权益带来的成本节省,请选择“是”。Select Yes if you want to bring your own SQL Server license with Software Assurance to benefit from cost savings with hybrid use.

  8. 选择“下一步”。Select Next.

“部署设置”页Deployment settings page

在“集成运行时设置”窗格的“部署设置”页中,你可以选择创建 SSISDB 和/或 Azure-SSIS IR 包存储 。On the Deployment settings page of Integration runtime setup pane, you have the options to create SSISDB and or Azure-SSIS IR package stores.

创建 SSISDBCreating SSISDB

在“集成运行时设置”窗格的“部署设置”页中,如果要将包部署到 SSISDB(项目部署模型),请选中“创建由 Azure SQL 数据库服务器/托管实例托管的 SSIS 目录 (SSISDB) 来存储项目/包/环境/执行日志”复选框 。On the Deployment settings page of Integration runtime setup pane, if you want to deploy your packages into SSISDB (Project Deployment Model), select the Create SSIS catalog (SSISDB) hosted by Azure SQL Database server/Managed Instance to store your projects/packages/environments/execution logs check box. 或者,如果要将包部署到由 Azure SQL 托管实例(包部署模型)托管的文件系统、Azure 文件存储或 SQL Server 数据库 (MSDB) 中,则无需创建 SSISDB 或选中该复选框。Alternatively, if you want to deploy your packages into file system, Azure Files, or SQL Server database (MSDB) hosted by Azure SQL Managed Instance (Package Deployment Model), no need to create SSISDB nor select the check box.

无论采用哪种部署模型,如果要使用由 Azure SQL 托管实例托管的 SQL Server 代理来协调/安排包执行,请选中该复选框,因为它已由 SSISDB 启用。Regardless of your deployment model, if you want to use SQL Server Agent hosted by Azure SQL Managed Instance to orchestrate/schedule your package executions, it's enabled by SSISDB, so select the check box anyway. 有关详细信息,请参阅通过 Azure SQL 托管实例代理来安排 SSIS 包执行For more information, see Schedule SSIS package executions via Azure SQL Managed Instance Agent.

如果选中该复选框,请完成以下步骤以提供你自己的数据库服务器来承载我们将代表你创建和管理的 SSISDB。If you select the check box, complete the following steps to bring your own database server to host SSISDB that we'll create and manage on your behalf.

SSISDB 的部署设置

  1. 对于“订阅”,请选择使用数据库服务器来托管 SSISDB 的 Azure 订阅。For Subscription, select the Azure subscription that has your database server to host SSISDB.

  2. 对于“位置”,请选择用于托管 SSISDB 的数据库服务器的位置。For Location, select the location of your database server to host SSISDB. 建议选择集成运行时的位置。We recommend that you select the same location of your integration runtime.

  3. 对于“目录数据库服务器终结点”,请选择用于承载 SSISDB 的数据库服务器的终结点。For Catalog Database Server Endpoint, select the endpoint of your database server to host SSISDB.

    根据所选的数据库服务器,系统可以代表你创建 SSISDB 实例作为单一数据库、创建此实例作为弹性池的一部分,或者在托管实例中创建。Based on the selected database server, the SSISDB instance can be created on your behalf as a single database, as part of an elastic pool, or in a managed instance. 可以在公用网络中访问或者通过加入虚拟网络来访问该实例。It can be accessible in a public network or by joining a virtual network. 有关选择用来托管 SSISDB 的数据库服务器类型的指导,请参阅比较 SQL 数据库与 SQL 托管实例For guidance in choosing the type of database server to host SSISDB, see Compare SQL Database and SQL Managed Instance.

    如果选择包含 IP 防火墙规则/虚拟网络服务终结点的 Azure SQL 数据库服务器来承载 SSISDB,或者需要在未配置自承载 IR 的情况下访问本地数据,则需要将 Azure-SSIS IR 加入虚拟网络。If you select an Azure SQL Database server with IP firewall rules/virtual network service endpoints to host SSISDB, or if you require access to on-premises data without configuring a self-hosted IR, you need to join your Azure-SSIS IR to a virtual network. 有关详细信息,请参阅在虚拟网络中创建 Azure-SSIS IRFor more information, see Create an Azure-SSIS IR in a virtual network.

  4. 选中“结合 ADF 的托管标识使用 Azure AD 身份验证”复选框,选择数据库服务器用来承载 SSISDB 的身份验证方法。Select the Use Azure AD authentication with the managed identity for your ADF check box to choose the authentication method for your database server to host SSISDB. 选择使用数据工厂的托管标识进行 SQL 身份验证或 Azure AD 身份验证。You'll choose either SQL authentication or Azure AD authentication with the managed identity for your data factory.

    如果选中该复选框,需将数据工厂的托管标识添加到有权访问数据库服务器的 Azure AD 组中。If you select the check box, you'll need to add the managed identity for your data factory into an Azure AD group with access permissions to your database server. 有关详细信息,请参阅使用 Azure AD 身份验证创建 Azure-SSIS IRFor more information, see Create an Azure-SSIS IR with Azure AD authentication.

  5. 对于“管理员用户名”,请输入用于承载 SSISDB 的数据库服务器的 SQL 身份验证用户名。For Admin Username, enter the SQL authentication username for your database server to host SSISDB.

  6. 对于“管理员密码”,请输入用于承载 SSISDB 的数据库服务器的 SQL 身份验证密码。For Admin Password, enter the SQL authentication password for your database server to host SSISDB.

  7. 对于“目录数据库服务层级”,请选择用于承载 SSISDB 的数据库服务器的服务层级。For Catalog Database Service Tier, select the service tier for your database server to host SSISDB. 选择“基本”、“标准”或“高级”层级,或选择弹性池名称。Select the Basic, Standard, or Premium tier, or select an elastic pool name.

如果适用,请选择“测试连接”,如果成功,请选择”下一步” 。Select Test connection when applicable and if it's successful, select Next.

创建 Azure-SSIS IR 包存储Creating Azure-SSIS IR package stores

在“集成运行时设置”窗格的“部署设置”页中,如果要使用 Azure-SSIS IR 包存储来管理部署到 MSDB、文件系统或 Azure 文件存储中的包(包部署模型),请选中“创建包存储以管理部署到由 Azure SQL 托管实例托管的文件系统/Azure 文件/SQL Server 数据库 (MSDB) 中的包”复选框 。On the Deployment settings page of Integration runtime setup pane, if you want to manage your packages that are deployed into MSDB, file system, or Azure Files (Package Deployment Model) with Azure-SSIS IR package stores, select the Create package stores to manage your packages that are deployed into file system/Azure Files/SQL Server database (MSDB) hosted by Azure SQL Managed Instance check box.

借助 Azure-SSIS IR 包存储,你可以通过与旧版 SSIS 包存储类似的 SSMS 导入/导出/删除/运行包以及监视/停止正在运行的包。Azure-SSIS IR package store allows you to import/export/delete/run packages and monitor/stop running packages via SSMS similar to the legacy SSIS package store. 有关详细信息,请参阅使用 Azure-SSIS IR 包存储管理 SSIS 包For more information, see Manage SSIS packages with Azure-SSIS IR package stores.

如果选中此复选框,则可以通过选择“新建”将多个包存储添加到 Azure-SSIS IR。If you select this check box, you can add multiple package stores to your Azure-SSIS IR by selecting New. 相反,多个 Azure SSIS IR 可以共享一个包存储。Conversely, one package store can be shared by multiple Azure-SSIS IRs.

MSDB/文件系统/Azure 文件存储的部署设置

在“添加包存储”窗格上,完成以下步骤。On the Add package store pane, complete the following steps.

  1. 对于“包存储名称”,请输入包存储的名称。For Package store name, enter the name of your package store.

  2. 对于“包存储链接服务”,请选择现有的链接服务,该服务存储在其中部署包的文件系统/Azure 文件存储/Azure SQL 托管实例的访问信息,或通过选择“新建”创建新链接服务 。For Package store linked service, select your existing linked service that stores the access information for file system/Azure Files/Azure SQL Managed Instance where your packages are deployed or create a new one by selecting New. 在“新建链接服务”窗格中,完成以下步骤。On the New linked service pane, complete the following steps.

    链接服务的部署设置

    1. 对于“名称”,请输入链接服务的名称。For Name, enter the name of your linked service.

    2. 对于“说明”,请输入链接服务的说明。For Description, enter the description of your linked service.

    3. 对于“类型”,请选择“Azure 文件存储”、“Azure SQL 托管实例”或“文件系统” 。For Type, select Azure File Storage, Azure SQL Managed Instance, or File System.

    4. 可以忽略“通过集成运行时连接”,因为我们始终使用 Azure-SSIS IR 来提取包存储的访问信息。You can ignore Connect via integration runtime, since we always use your Azure-SSIS IR to fetch the access information for package stores.

    5. 如果选择“Azure 文件存储”,请完成以下步骤。If you select Azure File Storage, complete the following steps.

      1. 对于“帐户选择方法”,请选择“从 Azure 订阅”或“手动输入” 。For Account selection method, select From Azure subscription or Enter manually.

      2. 如果选择“从 Azure 订阅”,请选择相关的“Azure 订阅”、“存储帐户名称”和“文件共享” 。If you select From Azure subscription, select the relevant Azure subscription, Storage account name, and File share.

      3. 如果选择“手动输入”,对于“主机”,请输入 \\<storage account name>.file.core.chinacloudapi.cn\<file share name>,对于“用户名”,请输入 Azure\<storage account name>,对于“密码”,请输入 <storage account key>,或选择在其中作为机密存储的“Azure 密钥保管库” 。If you select Enter manually, enter \\<storage account name>.file.core.chinacloudapi.cn\<file share name> for Host, Azure\<storage account name> for Username, and <storage account key> for Password or select your Azure Key Vault where it's stored as a secret.

    6. 如果选择“Azure SQL 托管实例”,请完成以下步骤。If you select Azure SQL Managed Instance, complete the following steps.

      1. 选择“连接字符串”,以进行手动输入,或选择在其中作为机密存储的“Azure 密钥保管库” 。Select Connection string to enter it manually or your Azure Key Vault where it's stored as a secret.

      2. 如果选择“连接字符串”,请完成以下步骤。If you select Connection string, complete the following steps.

        1. 对于“完全限定的域名”,请输入 <server name>.public.<dns prefix>.database.chinacloudapi.cn,3342 作为 Azure SQL 托管实例的公共终结点。For Fully qualified domain name, enter <server name>.public.<dns prefix>.database.chinacloudapi.cn,3342 as the public endpoint of your Azure SQL Managed Instance.

        2. 对于“数据库名称”,请输入 msdbFor Database name, enter msdb.

        3. 对于“身份验证类型”,请选择“SQL 身份验证”、“托管标识”或“服务主体” 。For Authentication type, select SQL Authentication, Managed Identity, or Service Principal.

        4. 如果选择“SQL 身份验证”,请输入相关的“用户名”和“密码”,或选择在其中作为机密存储的“Azure 密钥保管库” 。If you select SQL Authentication, enter the relevant Username and Password or select your Azure Key Vault where it's stored as a secret.

        5. 如果选择“托管标识”,请向 ADF 托管标识授予对 Azure SQL 托管实例的访问权限。If you select Managed Identity, grant your ADF managed identity access to your Azure SQL Managed Instance.

        6. 如果选择“服务主体”,请输入相关的“服务主体 ID”和“服务主体密钥”,或选择在其中作为机密存储的“Azure 密钥保管库” 。If you select Service Principal, enter the relevant Service principal ID and Service principal key or select your Azure Key Vault where it's stored as a secret.

    7. 如果选择“文件系统”,请输入在其中为“主机”部署了包的文件夹的 UNC 路径,以及相关的“用户名”和“密码”,或选择在其中作为机密存储的“Azure 密钥保管库” 。If you select File system, enter the UNC path of folder where your packages are deployed for Host, as well as the relevant Username and Password or select your Azure Key Vault where it's stored as a secret.

    8. 如果适用,请选择“测试连接”,如果成功,请选择“创建” 。Select Test connection when applicable and if it's successful, select Create.

  3. 添加的包存储将显示在“部署设置”页上。Your added package stores will appear on the Deployment settings page. 若要删除它们,请选中其复选框,然后选择“删除”。To remove them, select their check boxes, and then select Delete.

如果适用,请选择“测试连接”,如果成功,请选择”下一步” 。Select Test connection when applicable and if it's successful, select Next.

“高级设置”页Advanced settings page

在“集成运行时设置”窗格的“高级设置”页中,请完成以下步骤 。On the Advanced settings page of Integration runtime setup pane, complete the following steps.

高级设置

  1. 对于“每个节点的最大并行执行数”,请选择要在集成运行时群集中并发运行的最大包数(按节点)。For Maximum Parallel Executions Per Node, select the maximum number of packages to run concurrently per node in your integration runtime cluster. 仅显示支持的包数。Only supported package numbers are displayed. 如果需要使用多个核心来运行单个计算密集型或内存密集型的大型包,请选择较小的数字。Select a low number if you want to use more than one core to run a single large package that's compute or memory intensive. 如果需要在单个核心中运行一个或多个小型包,请选择较大的数字。Select a high number if you want to run one or more small packages in a single core.

  2. 选中“使用其他系统配置/组件安装自定义 Azure-SSIS 集成运行时”复选框,选择是否要在 Azure-SSIS IR 上添加标准/快速自定义设置。Select the Customize your Azure-SSIS Integration Runtime with additional system configurations/component installations check box to choose whether you want to add standard/express custom setups on your Azure-SSIS IR. 有关详细信息,请参阅 Azure-SSIS IR 的自定义安装For more information, see Custom setup for an Azure-SSIS IR.

    如果选中该复选框,请完成以下步骤。If you select the check box, complete the following steps.

    包含自定义安装的高级设置

    1. 对于“自定义安装容器 SAS URI”,请输入用于存储标准自定义安装脚本和关联文件的容器的 SAS URI。For Custom setup container SAS URI, enter the SAS URI of your container where you store scripts and associated files for standard custom setups.

    2. 对于“快速自定义安装”,请选择“新建”打开“添加快速自定义安装”面板,然后在“快速自定义安装类型”下拉菜单中选择任何类型,例如“运行 cmdkey 命令”、“添加环境变量”、“安装许可的组件”等。 For Express custom setup, select New to open the Add express custom setup panel and then select any types under the Express custom setup type dropdown menu, e.g. Run cmdkey command, Add environment variable, Install licensed component, etc.

      如果选择“安装许可的组件”类型,则可以在“组件名称”下拉菜单中选择我们的 ISV 合作伙伴提供的任何集成组件;如果需要,请在“许可密钥/许可文件”框中输入从合作伙伴购买的产品许可密钥/上传产品许可文件。 If you select the Install licensed component type, you can then select any integrated components from our ISV partners under the Component name dropdown menu and if required, enter the product license key/upload the product license file that you purchased from them into the License key/License file box.

      添加的快速自定义安装将显示在“高级设置”页上。Your added express custom setups will appear on the Advanced settings page. 若要删除它们,可以选中其复选框,然后选择“删除”。To remove them, you can select their check boxes and then select Delete.

  3. 选中“选择 Azure-SSIS 集成运行时要加入到的 VNet,允许 ADF 创建特定的网络资源,并提供自己的静态公共 IP 地址(可选)”复选框,选择是否要将集成运行时加入虚拟网络。Select the Select a VNet for your Azure-SSIS Integration Runtime to join, allow ADF to create certain network resources, and optionally bring your own static public IP addresses check box to choose whether you want to join your integration runtime to a virtual network.

    如果使用包含 IP 防火墙规则/虚拟网络服务终结点的 Azure SQL 数据库服务器来承载 SSISDB,或者需要在不配置自承载 IR 的情况下访问本地数据(即,SSIS 包中包含本地数据源或目标),请选择此项。Select it if you use an Azure SQL Database server with IP firewall rules/virtual network service endpoints to host SSISDB, or if you require access to on-premises data (that is, you have on-premises data sources or destinations in your SSIS packages) without configuring a self-hosted IR. 有关详细信息,请参阅将 Azure-SSIS IR 加入虚拟网络For more information, see Join Azure-SSIS IR to a virtual network.

    如果选中该复选框,请完成以下步骤。If you select the check box, complete the following steps.

    使用虚拟网络的高级设置

    1. 对于“订阅”,请选择包含你的虚拟网络的 Azure 订阅。For Subscription, select the Azure subscription that has your virtual network.

    2. 对于“位置”,系统已选择集成运行时所在的位置。For Location, the same location of your integration runtime is selected.

    3. 对于“类型”,请选择虚拟网络的类型:“经典”或“Azure 资源管理器”。For Type, select the type of your virtual network: classic or Azure Resource Manager. 我们建议选择 Azure 资源管理器虚拟网络,因为经典虚拟网络在不久后将被弃用。We recommend that you select an Azure Resource Manager virtual network, because classic virtual networks will be deprecated soon.

    4. 对于“VNet 名称”,请选择虚拟网络的名称。For VNet Name, select the name of your virtual network. 它应该包含用于承载 SSISDB 的虚拟网络服务终结点的 Azure SQL 数据库服务器所用的虚拟网络相同。It should be the same one used for your Azure SQL Database server with virtual network service endpoints to host SSISDB. 或者,它应该是连接到本地网络的同一个虚拟网络。Or it should be the same one connected to your on-premises network. 否则,它可以是为 Azure-SSIS IR 提供你自己的静态公共 IP 地址的任何虚拟网络。Otherwise, it can be any virtual network to bring your own static public IP addresses for Azure-SSIS IR.

    5. 对于“子网名称”,请选择虚拟网络的子网名称。For Subnet Name, select the name of subnet for your virtual network. 它应该包含用于承载 SSISDB 的虚拟网络服务终结点的 Azure SQL 数据库服务器所用的虚拟网络相同。It should be the same one used for your Azure SQL Database server with virtual network service endpoints to host SSISDB. 否则,它可以是为 Azure-SSIS IR 提供你自己的静态公共 IP 地址的任何子网。Otherwise, it can be any subnet to bring your own static public IP addresses for Azure-SSIS IR.

    6. 选中“为 Azure-SSIS Integration Runtime 提供静态公共 IP 地址”复选框,以选择是否要为 Azure-SSIS IR 提供自己的静态公共 IP 地址,以便可以在数据源的防火墙中允许这些地址。Select the Bring static public IP addresses for your Azure-SSIS Integration Runtime check box to choose whether you want to bring your own static public IP addresses for Azure-SSIS IR, so you can allow them on the firewall for your data sources.

      如果选中该复选框,请完成以下步骤。If you select the check box, complete the following steps.

      1. 对于“第一个静态公共 IP 地址”,请选择符合 Azure-SSIS IR 的要求的第一个静态公共 IP 地址。For First static public IP address, select the first static public IP address that meets the requirements for your Azure-SSIS IR. 如果没有任何符合要求的 IP 地址,请单击“新建”链接以在 Azure 门户中创建静态公共 IP 地址,然后单击此处的刷新按钮,以便可以选择创建的地址。If you don't have any, click Create new link to create static public IP addresses on Azure portal and then click the refresh button here, so you can select them.

      2. 对于“第二个静态公共 IP 地址”,请选择符合 Azure-SSIS IR 的要求的第二个静态公共 IP 地址。For Second static public IP address, select the second static public IP address that meets the requirements for your Azure-SSIS IR. 如果没有任何符合要求的 IP 地址,请单击“新建”链接以在 Azure 门户中创建静态公共 IP 地址,然后单击此处的刷新按钮,以便可以选择创建的地址。If you don't have any, click Create new link to create static public IP addresses on Azure portal and then click the refresh button here, so you can select them.

  4. 选中“将自承载集成运行时安装为 Azure-SSIS 集成运行时的代理”复选框,选择是否要将自承载 IR 配置为 Azure-SSIS IR 的代理。Select the Set up Self-Hosted Integration Runtime as a proxy for your Azure-SSIS Integration Runtime check box to choose whether you want to configure a self-hosted IR as proxy for your Azure-SSIS IR. 有关详细信息,请参阅将自承载 IR 设置为代理For more information, see Set up a self-hosted IR as proxy.

    如果选中该复选框,请完成以下步骤。If you select the check box, complete the following steps.

    使用自承载 IR 的高级设置

    1. 对于“自承载集成运行时”,选择现有的自承载 IR 作为 Azure-SSIS IR 的代理。For Self-Hosted Integration Runtime, select your existing self-hosted IR as a proxy for Azure-SSIS IR.

    2. 对于“暂存存储链接服务”,请选择现有的 Azure Blob 存储链接服务,或创建新的Azure Blob 存储链接服务进行暂存。For Staging Storage Linked Service, select your existing Azure Blob storage linked service or create a new one for staging.

    3. 对于“暂存路径”,请指定所选 Azure Blob 存储帐户中的某个 Blob 容器,或将其留空以使用默认容器进行暂存。For Staging Path, specify a blob container in your selected Azure Blob storage account or leave it empty to use a default one for staging.

  5. 选择“VNet 验证” > “继续”。 Select VNet Validation > Continue.

在“摘要”部分检查所有预配设置,将建议的文档链接添加为书签,然后选择“完成”开始创建集成运行时。 On the Summary section, review all provisioning settings, bookmark the recommended documentation links, and select Finish to start the creation of your integration runtime.

备注

此过程应在 5 分钟内完成(不包括任何自定义安装时间)。Excluding any custom setup time, this process should finish within 5 minutes. 但是,Azure-SSIS IR 可能需要 20-30 分钟才能加入虚拟网络。But it might take 20-30 minutes for the Azure-SSIS IR to join a virtual network.

如果使用 SSISDB,数据工厂服务将连接到数据库服务器以准备 SSISDB。If you use SSISDB, the Data Factory service will connect to your database server to prepare SSISDB. 它还会配置虚拟网络的权限和设置(如果已指定),并将 Azure-SSIS IR 加入虚拟网络中。It also configures permissions and settings for your virtual network, if specified, and joins your Azure-SSIS IR to the virtual network.

预配 Azure-SSIS IR 时,还会安装 Access Redistributable 和 Azure Feature Pack for SSIS。When you provision an Azure-SSIS IR, Access Redistributable and Azure Feature Pack for SSIS are also installed. 除了内置组件已支持的数据源外,这些组件还提供与 Excel 文件、Access 文件和各种 Azure 数据源的连接。These components provide connectivity to Excel files, Access files, and various Azure data sources, in addition to the data sources that built-in components already support. 有关内置/已预安装组件的详细信息,请参阅 Azure-SSIS IR 上的内置/已预安装组件For more information about built-in/preinstalled components, see Built-in/preinstalled components on Azure-SSIS IR. 有关可安装的其他组件的详细信息,请参阅 Azure-SSIS IR 的自定义安装For more information about additional components that you can install, see Custom setups for Azure-SSIS IR.

“连接”窗格Connections pane

在“管理”中心的“连接”窗格中,切换到“集成运行时”页,然后选择“刷新” 。On the Connections pane of Manage hub, switch to the Integration runtimes page and select Refresh.

“连接”窗格

可以通过选择 Azure-SSIS IR 的名称来对其进行编辑/重新配置。You can edit/reconfigure your Azure-SSIS IR by selecting its name. 此外,还可以选择相应的按钮来监视/启动/停止/删除 Azure-SSIS IR,通过“执行 SSIS 包”活动自动生成 ADF 管道以在 Azure-SSIS IR 上运行,并查看 Azure-SSIS IR 的 JSON 代码/有效负载。You can also select the relevant buttons to monitor/start/stop/delete your Azure-SSIS IR, auto-generate an ADF pipeline with Execute SSIS Package activity to run on your Azure-SSIS IR, and view the JSON code/payload of your Azure-SSIS IR. 只能在 Azure-SSIS IR 停止时对其执行编辑/删除操作。Editing/deleting your Azure-SSIS IR can only be done when it's stopped.

门户中的 Azure SSIS 集成运行时Azure SSIS integration runtimes in the portal

  1. 在 Azure 数据工厂 UI 中切换到“编辑”选项卡,选择“连接”。 In the Azure Data Factory UI, switch to the Edit tab and select Connections. 然后切换到“集成运行时”选项卡以查看数据工厂中的现有集成运行时。Then switch to the Integration Runtimes tab to view existing integration runtimes in your data factory.

    查看现有 IR

  2. 选择“新建”,创建新的 Azure-SSIS IR,并打开“集成运行时设置”窗格 。Select New to create a new Azure-SSIS IR and open the Integration runtime setup pane.

    通过菜单创建集成运行时

  3. 在“集成运行时设置”窗格中选择“直接迁移现有的 SSIS 包以在 Azure 中执行”磁贴,然后选择“下一步” 。In the Integration runtime setup pane, select the Lift-and-shift existing SSIS packages to execute in Azure tile, and then select Next.

    指定集成运行时的类型

  4. 请参阅预配 Azure SSIS 集成运行时部分,了解用于设置 Azure-SSIS IR 的剩余步骤。For the remaining steps to set up an Azure-SSIS IR, see the Provision an Azure SSIS integration runtime section.

使用 Azure PowerShell 创建集成运行时Use Azure PowerShell to create an integration runtime

在本部分,你将使用 Azure PowerShell 来创建 Azure-SSIS IR。In this section, you use Azure PowerShell to create an Azure-SSIS IR.

创建变量Create variables

复制并粘贴以下脚本。Copy and paste the following script. 指定变量的值。Specify values for the variables.

### Azure Data Factory info
# If your input contains a PSH special character like "$", precede it with the escape character "`" - for example, "`$"
$SubscriptionName = "[your Azure subscription name]"
$ResourceGroupName = "[your Azure resource group name]"
# Data factory name - must be globally unique
$DataFactoryName = "[your data factory name]"
# For supported regions, see https://azure.microsoft.com/global-infrastructure/services/?regions=china-non-regional,china-east,china-east-2,china-north,china-north-2&products=data-factory
$DataFactoryLocation = "ChinaEast2"

### Azure-SSIS integration runtime info - This is a Data Factory compute resource for running SSIS packages.
$AzureSSISName = "[your Azure-SSIS IR name]"
$AzureSSISDescription = "[your Azure-SSIS IR description]"
# For supported regions, see https://azure.microsoft.com/global-infrastructure/services/?regions=china-non-regional,china-east,china-east-2,china-north,china-north-2&products=data-factory
$AzureSSISLocation = "ChinaEast2"
# For supported node sizes, see https://azure.cn/pricing/details/data-factory/ssis/
$AzureSSISNodeSize = "Standard_D8_v3"
# 1-10 nodes are currently supported
$AzureSSISNodeNumber = 2
# Azure-SSIS IR edition/license info: Standard or Enterprise
$AzureSSISEdition = "Standard" # Standard by default, whereas Enterprise lets you use advanced features on your Azure-SSIS IR
# Azure-SSIS IR hybrid usage info: LicenseIncluded or BasePrice
$AzureSSISLicenseType = "LicenseIncluded" # LicenseIncluded by default, whereas BasePrice lets you bring your own on-premises SQL Server license with Software Assurance to earn cost savings from Azure Hybrid Benefit option
# For a Standard_D1_v2 node, up to 4 parallel executions per node are supported. For other nodes, up to (2 x number of cores) are currently supported.
$AzureSSISMaxParallelExecutionsPerNode = 8
# Custom setup info: Standard/express custom setups
$SetupScriptContainerSasUri = "" # OPTIONAL to provide a SAS URI of blob container for standard custom setup where your script and its associated files are stored
$ExpressCustomSetup = "[RunCmdkey|SetEnvironmentVariable|InstallAzurePowerShell|SentryOne.TaskFactory|oh22is.SQLPhonetics.NET|oh22is.HEDDA.IO|KingswaySoft.IntegrationToolkit|KingswaySoft.ProductivityPack|Theobald.XtractIS|AecorSoft.IntegrationService or leave it empty]" # OPTIONAL to configure an express custom setup without script
# Virtual network info: Classic or Azure Resource Manager
$VnetId = "[your virtual network resource ID or leave it empty]" # REQUIRED if you use an Azure SQL Database server with IP firewall rules/virtual network service endpoints, or if you require access to on-premises data without configuring a self-hosted IR. We recommend an Azure Resource Manager virtual network, because classic virtual networks will be deprecated soon.
$SubnetName = "[your subnet name or leave it empty]" # WARNING: Use the same subnet as the one used for your Azure SQL Database server with virtual network service endpoints
# Public IP address info: OPTIONAL to provide two standard static public IP addresses with DNS name under the same subscription and in the same region as your virtual network
$FirstPublicIP = "[your first public IP address resource ID or leave it empty]"
$SecondPublicIP = "[your second public IP address resource ID or leave it empty]"

### SSISDB info
$SSISDBServerEndpoint = "[your Azure SQL Database server name.database.chinacloudapi.cn or managed instance name.public.DNS prefix.database.chinacloudapi.cn,3342 or leave it empty if you do not use SSISDB]" # WARNING: If you use SSISDB, ensure that there's no existing SSISDB on your database server, so we can prepare and manage one on your behalf
# Authentication info: SQL or Azure AD
$SSISDBServerAdminUserName = "[your server admin username for SQL authentication or leave it empty for Azure AD authentication]"
$SSISDBServerAdminPassword = "[your server admin password for SQL authentication or leave it empty for Azure AD authentication]"
# For the basic pricing tier, specify "Basic," not "B." For standard, premium, and elastic pool tiers, specify "S0," "S1," "S2," "S3," etc. See https://docs.azure.cn/sql-database/sql-database-resource-limits-database-server.
$SSISDBPricingTier = "[Basic|S0|S1|S2|S3|S4|S6|S7|S9|S12|P1|P2|P4|P6|P11|P15|…|ELASTIC_POOL(name = <elastic_pool_name>) for Azure SQL Database server or leave it empty for managed instance]"

### Self-hosted integration runtime info - This can be configured as a proxy for on-premises data access 
$DataProxyIntegrationRuntimeName = "" # OPTIONAL to configure a proxy for on-premises data access 
$DataProxyStagingLinkedServiceName = "" # OPTIONAL to configure a proxy for on-premises data access 
$DataProxyStagingPath = "" # OPTIONAL to configure a proxy for on-premises data access 

登录并选择订阅Sign in and select a subscription

添加以下脚本,以登录并选择 Azure 订阅。Add the following script to sign in and select your Azure subscription.

Connect-AzAccount -Environment AzureChinaCloud
Select-AzSubscription -SubscriptionName $SubscriptionName

验证与数据库服务器的连接Validate the connection to database server

添加以下脚本来验证 Azure SQL 数据库服务器或托管实例。Add the following script to validate your Azure SQL Database server or managed instance.

# Validate only if you use SSISDB and you don't use virtual network or Azure AD authentication
if(![string]::IsNullOrEmpty($SSISDBServerEndpoint))
{
    if([string]::IsNullOrEmpty($VnetId) -and [string]::IsNullOrEmpty($SubnetName))
    {
        if(![string]::IsNullOrEmpty($SSISDBServerAdminUserName) -and ![string]::IsNullOrEmpty($SSISDBServerAdminPassword))
        {
            $SSISDBConnectionString = "Data Source=" + $SSISDBServerEndpoint + ";User ID=" + $SSISDBServerAdminUserName + ";Password=" + $SSISDBServerAdminPassword
            $sqlConnection = New-Object System.Data.SqlClient.SqlConnection $SSISDBConnectionString;
            Try
            {
                $sqlConnection.Open();
            }
            Catch [System.Data.SqlClient.SqlException]
            {
                Write-Warning "Cannot connect to your Azure SQL Database server, exception: $_";
                Write-Warning "Please make sure the server you specified has already been created. Do you want to proceed? [Y/N]"
                $yn = Read-Host
                if(!($yn -ieq "Y"))
                {
                    Return;
                }
            }
        }
    }
}

配置虚拟网络Configure the virtual network

添加以下脚本以自动配置加入 Azure-SSIS 集成运行时的虚拟网络权限和设置。Add the following script to automatically configure virtual network permissions and settings for your Azure-SSIS integration runtime to join.

# Make sure to run this script against the subscription to which the virtual network belongs
if(![string]::IsNullOrEmpty($VnetId) -and ![string]::IsNullOrEmpty($SubnetName))
{
    # Register to the Azure Batch resource provider
    $BatchApplicationId = "ddbf3205-c6bd-46ae-8127-60eb93363864"
    $BatchObjectId = (Get-AzADServicePrincipal -ServicePrincipalName $BatchApplicationId).Id
    Register-AzResourceProvider -ProviderNamespace Microsoft.Batch
    while(!(Get-AzResourceProvider -ProviderNamespace "Microsoft.Batch").RegistrationState.Contains("Registered"))
    {
    Start-Sleep -s 10
    }
    if($VnetId -match "/providers/Microsoft.ClassicNetwork/")
    {
        # Assign the VM contributor role to Microsoft.Batch
        New-AzRoleAssignment -ObjectId $BatchObjectId -RoleDefinitionName "Classic Virtual Machine Contributor" -Scope $VnetId
    }
}

创建资源组Create a resource group

使用 New-AzResourceGroup 命令创建 Azure 资源组Create an Azure resource group by using the New-AzResourceGroup command. 资源组是在其中以组的形式部署和管理 Azure 资源的逻辑容器。A resource group is a logical container into which Azure resources are deployed and managed as a group.

如果资源组已存在,请不要将此代码复制到脚本中。If your resource group already exists, don't copy this code to your script.

New-AzResourceGroup -Location $DataFactoryLocation -Name $ResourceGroupName

创建数据工厂Create a data factory

运行以下命令创建数据工厂。Run the following command to create a data factory.

Set-AzDataFactoryV2 -ResourceGroupName $ResourceGroupName `
    -Location $DataFactoryLocation `
    -Name $DataFactoryName

创建集成运行时Create an integration runtime

运行以下命令,在 Azure 中创建运行 SSIS 包的 Azure-SSIS 集成运行时:Run the following commands to create an Azure-SSIS integration runtime that runs SSIS packages in Azure.

如果不使用 SSISDB,则可以省略 CatalogServerEndpointCatalogPricingTierCatalogAdminCredential 参数。If you don't use SSISDB, you can omit the CatalogServerEndpoint, CatalogPricingTier, and CatalogAdminCredential parameters.

如果不使用包含 IP 防火墙规则/虚拟网络服务终结点的 Azure SQL 数据库服务器来承载 SSISDB,或者需要访问本地数据,则可以省略 VNetIdSubnet 参数,或传递这些参数的空值。If you don't use an Azure SQL Database server with IP firewall rules/virtual network service endpoints to host SSISDB, or require access to on-premises data, you can omit the VNetId and Subnet parameters or pass empty values for them. 如果将自承载 IR 配置为 Azure-SSIS IR 的代理以访问本地数据,则也可以忽略这些参数。You can also omit them if you configure a self-hosted IR as proxy for your Azure-SSIS IR to access data on-premises. 否则不能省略这些参数,且必须传递虚拟网络配置中的有效值。Otherwise, you can't omit them and must pass valid values from your virtual network configuration. 有关详细信息,请参阅将 Azure-SSIS IR 加入虚拟网络For more information, see Join an Azure-SSIS IR to a virtual network.

如果使用托管实例来承载 SSISDB,则可以省略 CatalogPricingTier 参数,或传递该参数的空值。If you use managed instance to host SSISDB, you can omit the CatalogPricingTier parameter or pass an empty value for it. 否则不能省略此参数,且必须传递 Azure SQL 数据库支持的定价层列表中的有效值。Otherwise, you can't omit it and must pass a valid value from the list of supported pricing tiers for Azure SQL Database. 有关详细信息,请参阅 SQL 数据库资源限制For more information, see SQL Database resource limits.

如果对数据工厂的托管标识使用 Azure AD 身份验证以连接到数据库服务器,则可以省略 CatalogAdminCredential 参数。If you use Azure AD authentication with the managed identity for your data factory to connect to the database server, you can omit the CatalogAdminCredential parameter. 但必须将数据工厂的托管标识添加到有权访问数据库服务器的 Azure AD 组中。But you must add the managed identity for your data factory into an Azure AD group with access permissions to the database server. 有关详细信息,请参阅为 Azure-SSIS IR 启用 Azure AD 身份验证For more information, see Enable Azure AD authentication for an Azure-SSIS IR. 否则,不能忽略此参数,且必须传递由 SQL 身份验证的服务器管理员用户名和密码构成的有效对象。Otherwise, you can't omit it and must pass a valid object formed from your server admin username and password for SQL authentication.

Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
    -DataFactoryName $DataFactoryName `
    -Name $AzureSSISName `
    -Description $AzureSSISDescription `
    -Type Managed `
    -Location $AzureSSISLocation `
    -NodeSize $AzureSSISNodeSize `
    -NodeCount $AzureSSISNodeNumber `
    -Edition $AzureSSISEdition `
    -LicenseType $AzureSSISLicenseType `
    -MaxParallelExecutionsPerNode $AzureSSISMaxParallelExecutionsPerNode `
    -VnetId $VnetId `
    -Subnet $SubnetName
       
# Add the CatalogServerEndpoint, CatalogPricingTier, and CatalogAdminCredential parameters if you use SSISDB
if(![string]::IsNullOrEmpty($SSISDBServerEndpoint))
{
    Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
        -DataFactoryName $DataFactoryName `
        -Name $AzureSSISName `
        -CatalogServerEndpoint $SSISDBServerEndpoint `
        -CatalogPricingTier $SSISDBPricingTier

    if(![string]::IsNullOrEmpty($SSISDBServerAdminUserName) –and ![string]::IsNullOrEmpty($SSISDBServerAdminPassword)) # Add the CatalogAdminCredential parameter if you don't use Azure AD authentication
    {
        $secpasswd = ConvertTo-SecureString $SSISDBServerAdminPassword -AsPlainText -Force
        $serverCreds = New-Object System.Management.Automation.PSCredential($SSISDBServerAdminUserName, $secpasswd)

        Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
            -DataFactoryName $DataFactoryName `
            -Name $AzureSSISName `
            -CatalogAdminCredential $serverCreds
    }
}

# Add custom setup parameters if you use standard/express custom setups
if(![string]::IsNullOrEmpty($SetupScriptContainerSasUri))
{
    Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
        -DataFactoryName $DataFactoryName `
        -Name $AzureSSISName `
        -SetupScriptContainerSasUri $SetupScriptContainerSasUri
}
if(![string]::IsNullOrEmpty($ExpressCustomSetup))
{
    if($ExpressCustomSetup -eq "RunCmdkey")
    {
        $addCmdkeyArgument = "YourFileShareServerName or YourAzureStorageAccountName.file.core.chinacloudapi.cn"
        $userCmdkeyArgument = "YourDomainName\YourUsername or azure\YourAzureStorageAccountName"
        $passCmdkeyArgument = New-Object Microsoft.Azure.Management.DataFactory.Models.SecureString("YourPassword or YourAccessKey")
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.CmdkeySetup($addCmdkeyArgument, $userCmdkeyArgument, $passCmdkeyArgument)
    }
    if($ExpressCustomSetup -eq "SetEnvironmentVariable")
    {
        $variableName = "YourVariableName"
        $variableValue = "YourVariableValue"
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.EnvironmentVariableSetup($variableName, $variableValue)
    }
    if($ExpressCustomSetup -eq "InstallAzurePowerShell")
    {
        $moduleVersion = "YourAzModuleVersion"
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.AzPowerShellSetup($moduleVersion)
    }
    if($ExpressCustomSetup -eq "SentryOne.TaskFactory")
    {
        $licenseKey = New-Object Microsoft.Azure.Management.DataFactory.Models.SecureString("YourLicenseKey")
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.ComponentSetup($ExpressCustomSetup, $licenseKey)
    }
    if($ExpressCustomSetup -eq "oh22is.SQLPhonetics.NET")
    {
        $licenseKey = New-Object Microsoft.Azure.Management.DataFactory.Models.SecureString("YourLicenseKey")
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.ComponentSetup($ExpressCustomSetup, $licenseKey)
    }
    if($ExpressCustomSetup -eq "oh22is.HEDDA.IO")
    {
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.ComponentSetup($ExpressCustomSetup)
    }
    if($ExpressCustomSetup -eq "KingswaySoft.IntegrationToolkit")
    {
        $licenseKey = New-Object Microsoft.Azure.Management.DataFactory.Models.SecureString("YourLicenseKey")
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.ComponentSetup($ExpressCustomSetup, $licenseKey)
    }
    if($ExpressCustomSetup -eq "KingswaySoft.ProductivityPack")
    {
        $licenseKey = New-Object Microsoft.Azure.Management.DataFactory.Models.SecureString("YourLicenseKey")
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.ComponentSetup($ExpressCustomSetup, $licenseKey)
    }    
    if($ExpressCustomSetup -eq "Theobald.XtractIS")
    {
        $jsonData = Get-Content -Raw -Path YourLicenseFile.json
        $jsonData = $jsonData -replace '\s',''
        $jsonData = $jsonData.replace('"','\"')
        $licenseKey = New-Object Microsoft.Azure.Management.DataFactory.Models.SecureString($jsonData)
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.ComponentSetup($ExpressCustomSetup, $licenseKey)
    }
    if($ExpressCustomSetup -eq "AecorSoft.IntegrationService")
    {
        $licenseKey = New-Object Microsoft.Azure.Management.DataFactory.Models.SecureString("YourLicenseKey")
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.ComponentSetup($ExpressCustomSetup, $licenseKey)
    }
    # Create an array of one or more express custom setups
    $setups = New-Object System.Collections.ArrayList
    $setups.Add($setup)

    Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
        -DataFactoryName $DataFactoryName `
        -Name $AzureSSISName `
        -ExpressCustomSetup $setups
}

# Add self-hosted integration runtime parameters if you configure a proxy for on-premises data accesss
if(![string]::IsNullOrEmpty($DataProxyIntegrationRuntimeName) -and ![string]::IsNullOrEmpty($DataProxyStagingLinkedServiceName))
{
    Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
        -DataFactoryName $DataFactoryName `
        -Name $AzureSSISName `
        -DataProxyIntegrationRuntimeName $DataProxyIntegrationRuntimeName `
        -DataProxyStagingLinkedServiceName $DataProxyStagingLinkedServiceName

    if(![string]::IsNullOrEmpty($DataProxyStagingPath))
    {
        Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
            -DataFactoryName $DataFactoryName `
            -Name $AzureSSISName `
            -DataProxyStagingPath $DataProxyStagingPath
    }
}

# Add public IP address parameters if you bring your own static public IP addresses
if(![string]::IsNullOrEmpty($FirstPublicIP) -and ![string]::IsNullOrEmpty($SecondPublicIP))
{
    $publicIPs = @($FirstPublicIP, $SecondPublicIP)
    Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
        -DataFactoryName $DataFactoryName `
        -Name $AzureSSISName `
        -PublicIPs $publicIPs
}

启动集成运行时Start the integration runtime

运行以下命令以启动 Azure-SSIS Integration Runtime。Run the following commands to start the Azure-SSIS integration runtime.

write-host("##### Starting #####")
Start-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
    -DataFactoryName $DataFactoryName `
    -Name $AzureSSISName `
    -Force

write-host("##### Completed #####")
write-host("If any cmdlet is unsuccessful, please consider using -Debug option for diagnostics.")

备注

此过程应在 5 分钟内完成(不包括任何自定义安装时间)。Excluding any custom setup time, this process should finish within 5 minutes. 但是,Azure-SSIS IR 可能需要 20-30 分钟才能加入虚拟网络。But it might take 20-30 minutes for the Azure-SSIS IR to join a virtual network.

如果使用 SSISDB,数据工厂服务将连接到数据库服务器以准备 SSISDB。If you use SSISDB, the Data Factory service will connect to your database server to prepare SSISDB. 它还会配置虚拟网络的权限和设置(如果已指定),并将 Azure-SSIS IR 加入虚拟网络中。It also configures permissions and settings for your virtual network, if specified, and joins your Azure-SSIS IR to the virtual network.

预配 Azure-SSIS IR 时,还会安装 Access Redistributable 和 Azure Feature Pack for SSIS。When you provision an Azure-SSIS IR, Access Redistributable and Azure Feature Pack for SSIS are also installed. 除了内置组件已支持的数据源外,这些组件还提供与 Excel 文件、Access 文件和各种 Azure 数据源的连接。These components provide connectivity to Excel files, Access files, and various Azure data sources, in addition to the data sources that built-in components already support. 有关内置/已预安装组件的详细信息,请参阅 Azure-SSIS IR 上的内置/已预安装组件For more information about built-in/preinstalled components, see Built-in/preinstalled components on Azure-SSIS IR. 有关可安装的其他组件的详细信息,请参阅 Azure-SSIS IR 的自定义安装For more information about additional components that you can install, see Custom setups for Azure-SSIS IR.

完整脚本Full script

下面是创建 Azure-SSIS 集成运行时的完整脚本。Here's the full script that creates an Azure-SSIS integration runtime.

### Azure Data Factory info
# If your input contains a PSH special character like "$", precede it with the escape character "`" - for example, "`$"
$SubscriptionName = "[your Azure subscription name]"
$ResourceGroupName = "[your Azure resource group name]"
# Data factory name - must be globally unique
$DataFactoryName = "[your data factory name]"
# For supported regions, see https://azure.microsoft.com/global-infrastructure/services/?regions=china-non-regional,china-east,china-east-2,china-north,china-north-2&products=data-factory
$DataFactoryLocation = "ChinaEast2"

### Azure-SSIS integration runtime info - This is a Data Factory compute resource for running SSIS packages.
$AzureSSISName = "[your Azure-SSIS IR name]"
$AzureSSISDescription = "[your Azure-SSIS IR description]"
# For supported regions, see https://azure.microsoft.com/global-infrastructure/services/?regions=china-non-regional,china-east,china-east-2,china-north,china-north-2&products=data-factory
$AzureSSISLocation = "ChinaEast2"
# For supported node sizes, see https://azure.cn/pricing/details/data-factory/ssis/
$AzureSSISNodeSize = "Standard_D8_v3"
# 1-10 nodes are currently supported
$AzureSSISNodeNumber = 2
# Azure-SSIS IR edition/license info: Standard or Enterprise
$AzureSSISEdition = "Standard" # Standard by default, whereas Enterprise lets you use advanced features on your Azure-SSIS IR
# Azure-SSIS IR hybrid usage info: LicenseIncluded or BasePrice
$AzureSSISLicenseType = "LicenseIncluded" # LicenseIncluded by default, whereas BasePrice lets you bring your own on-premises SQL Server license with Software Assurance to earn cost savings from the Azure Hybrid Benefit option
# For a Standard_D1_v2 node, up to four parallel executions per node are supported. For other nodes, up to (2 x number of cores) are currently supported.
$AzureSSISMaxParallelExecutionsPerNode = 8
# Custom setup info: Standard/express custom setups
$SetupScriptContainerSasUri = "" # OPTIONAL to provide a SAS URI of blob container for standard custom setup where your script and its associated files are stored
$ExpressCustomSetup = "[RunCmdkey|SetEnvironmentVariable|InstallAzurePowerShell|SentryOne.TaskFactory|oh22is.SQLPhonetics.NET|oh22is.HEDDA.IO|KingswaySoft.IntegrationToolkit|KingswaySoft.ProductivityPack|Theobald.XtractIS|AecorSoft.IntegrationService or leave it empty]" # OPTIONAL to configure an express custom setup without script
# Virtual network info: Classic or Azure Resource Manager
$VnetId = "[your virtual network resource ID or leave it empty]" # REQUIRED if you use an Azure SQL Database server with IP firewall rules/virtual network service endpoints, or if you require access to on-premises data without configuring a self-hosted IR. We recommend an Azure Resource Manager virtual network, because classic virtual networks will be deprecated soon.
$SubnetName = "[your subnet name or leave it empty]" # WARNING: Use the same subnet as the one used for your Azure SQL Database server with virtual network service endpoints
# Public IP address info: OPTIONAL to provide two standard static public IP addresses with DNS name under the same subscription and in the same region as your virtual network
$FirstPublicIP = "[your first public IP address resource ID or leave it empty]"
$SecondPublicIP = "[your second public IP address resource ID or leave it empty]"

### SSISDB info
$SSISDBServerEndpoint = "[your Azure SQL Database server name.database.chinacloudapi.cn or managed instance name.public.DNS prefix.database.chinacloudapi.cn,3342 or leave it empty if you do not use SSISDB]" # WARNING: If you use SSISDB, ensure that there's no existing SSISDB on your database server, so we can prepare and manage one on your behalf
# Authentication info: SQL or Azure AD
$SSISDBServerAdminUserName = "[your server admin username for SQL authentication or leave it empty for Azure AD authentication]"
$SSISDBServerAdminPassword = "[your server admin password for SQL authentication or leave it empty for Azure AD authentication]"
# For the basic pricing tier, specify "Basic," not "B." For standard, premium, and elastic pool tiers, specify "S0," "S1," "S2," "S3," etc. See https://docs.azure.cn/sql-database/sql-database-resource-limits-database-server.
$SSISDBPricingTier = "[Basic|S0|S1|S2|S3|S4|S6|S7|S9|S12|P1|P2|P4|P6|P11|P15|…|ELASTIC_POOL(name = <elastic_pool_name>) for Azure SQL Database server or leave it empty for managed instance]"

### Self-hosted integration runtime info - This can be configured as a proxy for on-premises data access 
$DataProxyIntegrationRuntimeName = "" # OPTIONAL to configure a proxy for on-premises data access 
$DataProxyStagingLinkedServiceName = "" # OPTIONAL to configure a proxy for on-premises data access 
$DataProxyStagingPath = "" # OPTIONAL to configure a proxy for on-premises data access 

### Sign in and select a subscription
Connect-AzAccount -Environment AzureChinaCloud
Select-AzSubscription -SubscriptionName $SubscriptionName

### Validate the connection to the database server
# Validate only if you use SSISDB and don't use a virtual network or Azure AD authentication
if(![string]::IsNullOrEmpty($SSISDBServerEndpoint))
{
    if([string]::IsNullOrEmpty($VnetId) -and [string]::IsNullOrEmpty($SubnetName))
    {
        if(![string]::IsNullOrEmpty($SSISDBServerAdminUserName) -and ![string]::IsNullOrEmpty($SSISDBServerAdminPassword))
        {
            $SSISDBConnectionString = "Data Source=" + $SSISDBServerEndpoint + ";User ID=" + $SSISDBServerAdminUserName + ";Password=" + $SSISDBServerAdminPassword
            $sqlConnection = New-Object System.Data.SqlClient.SqlConnection $SSISDBConnectionString;
            Try
            {
                $sqlConnection.Open();
            }
            Catch [System.Data.SqlClient.SqlException]
            {
                Write-Warning "Cannot connect to your Azure SQL Database server, exception: $_";
                Write-Warning "Please make sure the server you specified has already been created. Do you want to proceed? [Y/N]"
                $yn = Read-Host
                if(!($yn -ieq "Y"))
                {
                    Return;
                }
            }
        }
    }
}

### Configure a virtual network
# Make sure to run this script against the subscription to which the virtual network belongs
if(![string]::IsNullOrEmpty($VnetId) -and ![string]::IsNullOrEmpty($SubnetName))
{
    # Register to the Azure Batch resource provider
    $BatchApplicationId = "ddbf3205-c6bd-46ae-8127-60eb93363864"
    $BatchObjectId = (Get-AzADServicePrincipal -ServicePrincipalName $BatchApplicationId).Id
    Register-AzResourceProvider -ProviderNamespace Microsoft.Batch
    while(!(Get-AzResourceProvider -ProviderNamespace "Microsoft.Batch").RegistrationState.Contains("Registered"))
    {
    Start-Sleep -s 10
    }
    if($VnetId -match "/providers/Microsoft.ClassicNetwork/")
    {
        # Assign the VM contributor role to Microsoft.Batch
        New-AzRoleAssignment -ObjectId $BatchObjectId -RoleDefinitionName "Classic Virtual Machine Contributor" -Scope $VnetId
    }
}

### Create a data factory
Set-AzDataFactoryV2 -ResourceGroupName $ResourceGroupName `
    -Location $DataFactoryLocation `
    -Name $DataFactoryName

### Create an integration runtime
Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
    -DataFactoryName $DataFactoryName `
    -Name $AzureSSISName `
    -Description $AzureSSISDescription `
    -Type Managed `
    -Location $AzureSSISLocation `
    -NodeSize $AzureSSISNodeSize `
    -NodeCount $AzureSSISNodeNumber `
    -Edition $AzureSSISEdition `
    -LicenseType $AzureSSISLicenseType `
    -MaxParallelExecutionsPerNode $AzureSSISMaxParallelExecutionsPerNode `
    -VnetId $VnetId `
    -Subnet $SubnetName
       
# Add CatalogServerEndpoint, CatalogPricingTier, and CatalogAdminCredential parameters if you use SSISDB
if(![string]::IsNullOrEmpty($SSISDBServerEndpoint))
{
    Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
        -DataFactoryName $DataFactoryName `
        -Name $AzureSSISName `
        -CatalogServerEndpoint $SSISDBServerEndpoint `
        -CatalogPricingTier $SSISDBPricingTier

    if(![string]::IsNullOrEmpty($SSISDBServerAdminUserName) –and ![string]::IsNullOrEmpty($SSISDBServerAdminPassword)) # Add the CatalogAdminCredential parameter if you don't use Azure AD authentication
    {
        $secpasswd = ConvertTo-SecureString $SSISDBServerAdminPassword -AsPlainText -Force
        $serverCreds = New-Object System.Management.Automation.PSCredential($SSISDBServerAdminUserName, $secpasswd)

        Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
            -DataFactoryName $DataFactoryName `
            -Name $AzureSSISName `
            -CatalogAdminCredential $serverCreds
    }
}

# Add custom setup parameters if you use standard/express custom setups
if(![string]::IsNullOrEmpty($SetupScriptContainerSasUri))
{
    Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
        -DataFactoryName $DataFactoryName `
        -Name $AzureSSISName `
        -SetupScriptContainerSasUri $SetupScriptContainerSasUri
}
if(![string]::IsNullOrEmpty($ExpressCustomSetup))
{
    if($ExpressCustomSetup -eq "RunCmdkey")
    {
        $addCmdkeyArgument = "YourFileShareServerName or YourAzureStorageAccountName.file.core.chinacloudapi.cn"
        $userCmdkeyArgument = "YourDomainName\YourUsername or azure\YourAzureStorageAccountName"
        $passCmdkeyArgument = New-Object Microsoft.Azure.Management.DataFactory.Models.SecureString("YourPassword or YourAccessKey")
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.CmdkeySetup($addCmdkeyArgument, $userCmdkeyArgument, $passCmdkeyArgument)
    }
    if($ExpressCustomSetup -eq "SetEnvironmentVariable")
    {
        $variableName = "YourVariableName"
        $variableValue = "YourVariableValue"
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.EnvironmentVariableSetup($variableName, $variableValue)
    }
    if($ExpressCustomSetup -eq "InstallAzurePowerShell")
    {
        $moduleVersion = "YourAzModuleVersion"
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.AzPowerShellSetup($moduleVersion)
    }
    if($ExpressCustomSetup -eq "SentryOne.TaskFactory")
    {
        $licenseKey = New-Object Microsoft.Azure.Management.DataFactory.Models.SecureString("YourLicenseKey")
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.ComponentSetup($ExpressCustomSetup, $licenseKey)
    }
    if($ExpressCustomSetup -eq "oh22is.SQLPhonetics.NET")
    {
        $licenseKey = New-Object Microsoft.Azure.Management.DataFactory.Models.SecureString("YourLicenseKey")
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.ComponentSetup($ExpressCustomSetup, $licenseKey)
    }
    if($ExpressCustomSetup -eq "oh22is.HEDDA.IO")
    {
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.ComponentSetup($ExpressCustomSetup)
    }
    if($ExpressCustomSetup -eq "KingswaySoft.IntegrationToolkit")
    {
        $licenseKey = New-Object Microsoft.Azure.Management.DataFactory.Models.SecureString("YourLicenseKey")
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.ComponentSetup($ExpressCustomSetup, $licenseKey)
    }
    if($ExpressCustomSetup -eq "KingswaySoft.ProductivityPack")
    {
        $licenseKey = New-Object Microsoft.Azure.Management.DataFactory.Models.SecureString("YourLicenseKey")
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.ComponentSetup($ExpressCustomSetup, $licenseKey)
    }    
    if($ExpressCustomSetup -eq "Theobald.XtractIS")
    {
        $jsonData = Get-Content -Raw -Path YourLicenseFile.json
        $jsonData = $jsonData -replace '\s',''
        $jsonData = $jsonData.replace('"','\"')
        $licenseKey = New-Object Microsoft.Azure.Management.DataFactory.Models.SecureString($jsonData)
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.ComponentSetup($ExpressCustomSetup, $licenseKey)
    }
    if($ExpressCustomSetup -eq "AecorSoft.IntegrationService")
    {
        $licenseKey = New-Object Microsoft.Azure.Management.DataFactory.Models.SecureString("YourLicenseKey")
        $setup = New-Object Microsoft.Azure.Management.DataFactory.Models.ComponentSetup($ExpressCustomSetup, $licenseKey)
    }
    # Create an array of one or more express custom setups
    $setups = New-Object System.Collections.ArrayList
    $setups.Add($setup)

    Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
        -DataFactoryName $DataFactoryName `
        -Name $AzureSSISName `
        -ExpressCustomSetup $setups
}

# Add self-hosted integration runtime parameters if you configure a proxy for on-premises data accesss
if(![string]::IsNullOrEmpty($DataProxyIntegrationRuntimeName) -and ![string]::IsNullOrEmpty($DataProxyStagingLinkedServiceName))
{
    Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
        -DataFactoryName $DataFactoryName `
        -Name $AzureSSISName `
        -DataProxyIntegrationRuntimeName $DataProxyIntegrationRuntimeName `
        -DataProxyStagingLinkedServiceName $DataProxyStagingLinkedServiceName

    if(![string]::IsNullOrEmpty($DataProxyStagingPath))
    {
        Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
            -DataFactoryName $DataFactoryName `
            -Name $AzureSSISName `
            -DataProxyStagingPath $DataProxyStagingPath
    }
}

# Add public IP address parameters if you bring your own static public IP addresses
if(![string]::IsNullOrEmpty($FirstPublicIP) -and ![string]::IsNullOrEmpty($SecondPublicIP))
{
    $publicIPs = @($FirstPublicIP, $SecondPublicIP)
    Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
        -DataFactoryName $DataFactoryName `
        -Name $AzureSSISName `
        -PublicIPs $publicIPs
}

### Start the integration runtime
write-host("##### Starting #####")
Start-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName `
    -DataFactoryName $DataFactoryName `
    -Name $AzureSSISName `
    -Force

write-host("##### Completed #####")
write-host("If any cmdlet is unsuccessful, please consider using -Debug option for diagnostics.")

使用 Azure 资源管理器模板创建集成运行时Use an Azure Resource Manager template to create an integration runtime

在本部分,你将使用 Azure 资源管理器模板创建 Azure-SSIS 集成运行时。In this section, you use an Azure Resource Manager template to create the Azure-SSIS integration runtime. 下面是示例演练:Here's a sample walkthrough:

  1. 使用以下 Azure 资源管理器模板创建一个 JSON 文件。Create a JSON file with the following Azure Resource Manager template. 请将尖括号中的值(占位符)替换为自己的值。Replace values in the angle brackets (placeholders) with your own values.

    {
        "contentVersion": "1.0.0.0",
        "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
        "parameters": {},
        "variables": {},
        "resources": [{
            "name": "<Specify a name for your data factory>",
            "apiVersion": "2018-06-01",
            "type": "Microsoft.DataFactory/factories",
            "location": "China East 2",
            "properties": {},
            "resources": [{
                "type": "integrationruntimes",
                "name": "<Specify a name for your Azure-SSIS IR>",
                "dependsOn": [ "<The name of the data factory you specified at the beginning>" ],
                "apiVersion": "2018-06-01",
                "properties": {
                    "type": "Managed",
                    "typeProperties": {
                        "computeProperties": {
                            "location": "China East 2",
                            "nodeSize": "Standard_D8_v3",
                            "numberOfNodes": 1,
                            "maxParallelExecutionsPerNode": 8
                        },
                        "ssisProperties": {
                            "catalogInfo": {
                                "catalogServerEndpoint": "<Azure SQL Database server name>.database.chinacloudapi.cn",
                                "catalogAdminUserName": "<Azure SQL Database server admin username>",
                                "catalogAdminPassword": {
                                    "type": "SecureString",
                                    "value": "<Azure SQL Database server admin password>"
                                },
                                "catalogPricingTier": "Basic"
                            }
                        }
                    }
                }
            }]
        }]
    }
    
  2. 若要部署 Azure 资源管理器模板,请按以下示例所示运行 New-AzResourceGroupDeployment 命令。To deploy the Azure Resource Manager template, run the New-AzResourceGroupDeployment command as shown in the following example. 在此示例中,ADFTutorialResourceGroup 是资源组的名称。In the example, ADFTutorialResourceGroup is the name of your resource group. ADFTutorialARM.json 是包含数据工厂和 Azure-SSIS IR 的 JSON 定义的文件。ADFTutorialARM.json is the file that contains the JSON definition for your data factory and the Azure-SSIS IR.

    New-AzResourceGroupDeployment -Name MyARMDeployment -ResourceGroupName ADFTutorialResourceGroup -TemplateFile ADFTutorialARM.json
    

    此命令将创建数据工厂并在其中创建 Azure-SSIS IR,但不会启动 IR。This command creates your data factory and Azure-SSIS IR in it, but it doesn't start the IR.

  3. 若要启动 Azure-SSIS IR,请运行 Start-AzDataFactoryV2IntegrationRuntime 命令:To start your Azure-SSIS IR, run the Start-AzDataFactoryV2IntegrationRuntime command:

    Start-AzDataFactoryV2IntegrationRuntime -ResourceGroupName "<Resource Group Name>" `
        -DataFactoryName "<Data Factory Name>" `
        -Name "<Azure SSIS IR Name>" `
        -Force
    

备注

此过程应在 5 分钟内完成(不包括任何自定义安装时间)。Excluding any custom setup time, this process should finish within 5 minutes. 但是,Azure-SSIS IR 可能需要 20-30 分钟才能加入虚拟网络。But it might take 20-30 minutes for the Azure-SSIS IR to join a virtual network.

如果使用 SSISDB,数据工厂服务将连接到数据库服务器以准备 SSISDB。If you use SSISDB, the Data Factory service will connect to your database server to prepare SSISDB. 它还会配置虚拟网络的权限和设置(如果已指定),并将 Azure-SSIS IR 加入虚拟网络中。It also configures permissions and settings for your virtual network, if specified, and joins your Azure-SSIS IR to the virtual network.

预配 Azure-SSIS IR 时,还会安装 Access Redistributable 和 Azure Feature Pack for SSIS。When you provision an Azure-SSIS IR, Access Redistributable and Azure Feature Pack for SSIS are also installed. 除了内置组件已支持的数据源外,这些组件还提供与 Excel 文件、Access 文件和各种 Azure 数据源的连接。These components provide connectivity to Excel files, Access files, and various Azure data sources, in addition to the data sources that built-in components already support. 有关内置/已预安装组件的详细信息,请参阅 Azure-SSIS IR 上的内置/已预安装组件For more information about built-in/preinstalled components, see Built-in/preinstalled components on Azure-SSIS IR. 有关可安装的其他组件的详细信息,请参阅 Azure-SSIS IR 的自定义安装For more information about additional components that you can install, see Custom setups for Azure-SSIS IR.

部署 SSIS 包Deploy SSIS packages

如果使用 SSISDB,可将包部署到其中,并使用已启用 Azure 的 SSDT 或 SSMS 工具在 Azure-SSIS IR 上运行它们。If you use SSISDB, you can deploy your packages into it and run them on your Azure-SSIS IR by using the Azure-enabled SSDT or SSMS tools. 这些工具通过数据库服务器的服务器终结点来与该服务器建立连接:These tools connect to your database server via its server endpoint:

  • 对于 Azure SQL 数据库服务器,服务器终结点格式为 <server name>.database.chinacloudapi.cnFor an Azure SQL Database server, the server endpoint format is <server name>.database.chinacloudapi.cn.
  • 对于具有公共终结点的托管实例,服务器终结点格式为 <server name>.public.<dns prefix>.database.chinacloudapi.cn,3342For a managed instance with public endpoint, the server endpoint format is <server name>.public.<dns prefix>.database.chinacloudapi.cn,3342.

如果不使用 SSISDB,则可以将包部署到由 Azure SQL 托管实例托管的文件系统、Azure 文件存储或 MSDB 中,并使用 dtutilAzureDTExec 命令行实用工具在 Azure-SSIS IR 上运行它们。If you don't use SSISDB, you can deploy your packages into file system, Azure Files, or MSDB hosted by your Azure SQL Managed Instance and run them on your Azure-SSIS IR by using dtutil and AzureDTExec command-line utilities.

有关详细信息,请参阅部署 SSIS 项目/包For more information, see Deploy SSIS projects/packages.

在这两种情况下,还可以使用数据工厂管道中的“执行 SSIS 包”活动在 Azure-SSIS IR 上运行已部署的包。In both cases, you can also run your deployed packages on Azure-SSIS IR by using the Execute SSIS Package activity in Data Factory pipelines. 有关详细信息,请参阅以第一类数据工厂活动的形式调用 SSIS 包执行For more information, see Invoke SSIS package execution as a first-class Data Factory activity.

后续步骤Next steps

请参阅本文档中的其他 Azure-SSIS IR 主题:See other Azure-SSIS IR topics in this documentation: