针对 Azure SQL 数据库异地复制和故障转移配置 Azure-SSIS Integration RuntimeConfigure the Azure-SSIS Integration Runtime with Azure SQL Database geo-replication and failover

本文介绍了如何针对 Azure SQL 数据库异地复制和 SSISDB 数据库配置 Azure-SSIS Integration Runtime。This article describes how to configure the Azure-SSIS Integration Runtime with Azure SQL Database geo-replication for the SSISDB database. 发生故障转移时,你可以确保 Azure-SSIS IR 使用辅助数据库保持工作。When a failover occurs, you can ensure that the Azure-SSIS IR keeps working with the secondary database.

有关 SQL 数据库的异地复制和故障转移的详细信息,请参阅概述:活动异地复制和自动故障转移组For more info about geo-replication and failover for SQL Database, see Overview: Active geo-replication and auto-failover groups.

Note

本文进行了更新,以便使用新的 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.

方案 1 - Azure-SSIS IR 指向读写侦听器终结点Scenario 1 - Azure-SSIS IR is pointing to read-write listener endpoint

ConditionsConditions

当以下条件成立时本部分内容适用:This section applies when the following conditions are true:

  • Azure-SSIS IR 指向故障转移组的读写侦听器终结点。The Azure-SSIS IR is pointing to the read-write listener endpoint of the failover group.

    ANDAND

  • SQL 数据库服务器“未” 配置虚拟网络服务终结点规则。The SQL Database server is not configured with the virtual network service endpoint rule.

解决方案Solution

发生故障转移时,它对 Azure-SSIS IR 是透明的。When failover occurs, it is transparent to the Azure-SSIS IR. Azure-SSIS IR 会自动连接到故障转移组的新的主数据库。The Azure-SSIS IR automatically connects to the new primary of the failover group.

方案 2 - Azure-SSIS IR 指向主服务器终结点Scenario 2 - Azure-SSIS IR is pointing to primary server endpoint

ConditionsConditions

当以下条件之一成立时本部分内容适用:This section applies when one of the following conditions is true:

  • Azure-SSIS IR 指向故障转移组的主服务器终结点。The Azure-SSIS IR is pointing to the primary server endpoint of the failover group. 发生故障转移时,此终结点更改。This endpoint changes when failover occurs.

    OROR

  • Azure SQL 数据库服务器配置了虚拟网络服务终结点规则。The Azure SQL Database server is configured with the virtual network service endpoint rule.

    OROR

  • 数据库服务器是配置有虚拟网络的 SQL 数据库托管实例。The database server is a SQL Database Managed Instance configured with a virtual network.

解决方案Solution

发生故障转移时,您必须执行以下操作:When failover occurs, you have to do the following things:

  1. 停止 Azure-SSIS IR。Stop the Azure-SSIS IR.

  2. 重新配置 IR 以指向新的主终结点并指向新区域中的虚拟网络。Reconfigure the IR to point to the new primary endpoint and to a virtual network in the new region.

  3. 重启 IR。Restart the IR.

以下各部分更详细地说明了这些步骤。The following sections describe these steps in more detail.

先决条件Prerequisites

步骤Steps

遵循以下步骤停止 Azure-SSIS IR,切换到新区域,然后再次启动该 IR。Follow these steps to stop your Azure-SSIS IR, switch the IR to a new region, and start it again.

  1. 在原始区域中停止 IR。Stop the IR in the original region.

  2. 在 PowerShell 中调用以下命令来使用新设置更新 IR。Call the following command in PowerShell to update the IR with the new settings.

    Set-AzDataFactoryV2IntegrationRuntime -Location "new region" `
                    -CatalogServerEndpoint "Azure SQL Database server endpoint" `
                    -CatalogAdminCredential "Azure SQL Database server admin credentials" `
                    -VNetId "new VNet" `
                    -Subnet "new subnet" `
                    -SetupScriptContainerSasUri "new custom setup SAS URI"
    

    有关此 PowerShell 命令的详细信息,请参阅在 Azure 数据工厂中创建 Azure-SSIS 集成运行时For more info about this PowerShell command, see Create the Azure-SSIS integration runtime in Azure Data Factory

  3. 再次启动 IR。Start the IR again.

方案 3 - 将现有的 SSISDB(SSIS 目录)附加到新的 Azure-SSIS IRScenario 3 - Attaching an existing SSISDB (SSIS catalog) to a new Azure-SSIS IR

在当前区域中发生 ADF 或 Azure-SSIS IR 灾难时,可以使 SSISDB 在新区域中继续使用新的 Azure-SSIS IR。When an ADF or Azure-SSIS IR disaster occurs in current region, you can make your SSISDB keeps working with a new Azure-SSIS IR in a new region.

先决条件Prerequisites

步骤Steps

遵循以下步骤停止 Azure-SSIS IR,切换到新区域,然后再次启动该 IR。Follow these steps to stop your Azure-SSIS IR, switch the IR to a new region, and start it again.

  1. 执行存储过程以使 SSISDB 附加到 <new_data_factory_name><new_integration_runtime_name>Execute stored procedure to make SSISDB attached to <new_data_factory_name> or <new_integration_runtime_name>.
  EXEC [catalog].[failover_integration_runtime] @data_factory_name='<new_data_factory_name>', @integration_runtime_name='<new_integration_runtime_name>'
  1. 在新区域中创建名为 <new_data_factory_name> 的新数据工厂。Create a new data factory named <new_data_factory_name> in the new region. 有关详细信息,请参阅“创建数据工厂”。For more info, see Create a data factory.

    Set-AzDataFactoryV2 -ResourceGroupName "new resource group name" `
                        -Location "new region"`
                        -Name "<new_data_factory_name>"
    

    有关此 PowerShell 命令的详细信息,请参阅使用 PowerShell 创建 Azure 数据工厂For more info about this PowerShell command, see Create an Azure data factory using PowerShell

  2. 使用 Azure PowerShell 在新区域中创建名为 <new_integration_runtime_name> 的新 Azure-SSIS IR。Create a new Azure-SSIS IR named <new_integration_runtime_name> in the new region using Azure PowerShell.

    Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName "new resource group name" `
                                           -DataFactoryName "new data factory name" `
                                           -Name "<new_integration_runtime_name>" `
                                           -Description $AzureSSISDescription `
                                           -Type Managed `
                                           -Location $AzureSSISLocation `
                                           -NodeSize $AzureSSISNodeSize `
                                           -NodeCount $AzureSSISNodeNumber `
                                           -Edition $AzureSSISEdition `
                                           -LicenseType $AzureSSISLicenseType `
                                           -MaxParallelExecutionsPerNode $AzureSSISMaxParallelExecutionsPerNode `
                                           -VnetId "new vnet" `
                                           -Subnet "new subnet" `
                                           -CatalogServerEndpoint $SSISDBServerEndpoint `
                                           -CatalogPricingTier $SSISDBPricingTier
    

    有关此 PowerShell 命令的详细信息,请参阅在 Azure 数据工厂中创建 Azure-SSIS 集成运行时For more info about this PowerShell command, see Create the Azure-SSIS integration runtime in Azure Data Factory

  3. 再次启动 IR。Start the IR again.

后续步骤Next steps

考虑 Azure-SSIS IR 的以下其他配置选项:Consider these other configuration options for the Azure-SSIS IR: