您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

为多层 Dynamics AX 应用程序设置灾难恢复Set up disaster recovery for a multitier Dynamics AX application

Dynamics AX 是企业使用最广泛的 ERP 解决方案之一,可用于标准化不同位置的流程,管理资源及简化符合性。Dynamics AX is one of the most popular ERP solutions used by enterprises to standardize processes across locations, manage resources, and simplify compliance. 应用程序对组织至关重要,因此发生灾难时,应用程序应在最短的时间内启动并运行。Because the application is critical to an organization, in the event of a disaster, the application should be up and running in minimum time.

目前,Dynamics AX 不提供任何现成的灾难恢复功能。Today, Dynamics AX doesn't provide any out-of-the-box disaster recovery capabilities. Dynamics AX 包括许多服务器组件,例如 Windows 应用程序对象服务器、Azure Active Directory、Azure SQL 数据库、SharePoint Server 和 Reporting Services 等。Dynamics AX consists of many server components, such as Windows Application Object Server, Azure Active Directory, Azure SQL Database, SharePoint Server, and Reporting Services. 手动管理其中每个组件的灾难恢复不仅费用高昂,而且还容易出错。To manage the disaster recovery of each of these components manually is not only expensive but also error prone.

本文介绍如何使用 Azure Site Recovery 为 Dynamics AX 应用程序创建灾难恢复解决方案。This article explains how you can create a disaster recovery solution for your Dynamics AX application by using Azure Site Recovery. 此外,还介绍了使用一键式恢复计划的计划内/计划外测试故障转移,以及支持的配置和先决条件。It also covers planned/unplanned test failovers by using a one-click recovery plan, supported configurations, and prerequisites.


使用 Site Recovery 为 Dynamics AX 应用程序实现灾难恢复需以下先决条件:Implementing disaster recovery for Dynamics AX application by using Site Recovery requires the following prerequisites:

• 设置本地 Dynamics AX 部署。• Set up an on-premises Dynamics AX deployment.

• 在 Azure 订阅中创建 Site Recovery 保管库。• Create a Site Recovery vault in an Azure subscription.

• 如果 Azure 是恢复站点,则在 VM 上运行 Azure 虚拟机就绪评估工具。• If Azure is your recovery site, run the Azure Virtual Machine Readiness Assessment tool on the VMs. 它们必须与 Azure 虚拟机和 Site Recovery 服务兼容。They must be compatible with the Azure Virtual Machines and Site Recovery services.

Site Recovery 支持Site Recovery support

为创作本文,我们在 Windows Server 2012 R2 Enterprise 上装载了 Dynamics AX 2012 R3,并使用了 VMware 虚拟机。For the purpose of creating this article, we used VMware virtual machines with Dynamics AX 2012 R3 on Windows Server 2012 R2 Enterprise. 由于 Site Recovery 复制不区分应用程序,因此预计此处提供的建议也适用于后续方案。Because site recovery replication is application agnostic, we expect the recommendations provided here to hold for the following scenarios.

源和目标Source and target

方案Scenario 到辅助站点To a secondary site 到 AzureTo Azure
Hyper-VHyper-V Yes Yes
VMwareVMware Yes Yes
物理服务器Physical server Yes Yes

使用 Site Recovery 启用 Dynamics AX 应用程序的灾难恢复Enable disaster recovery of the Dynamics AX application by using Site Recovery

保护 Dynamics AX 应用程序Protect your Dynamics AX application

若要实现完整应用程序复制与恢复,Dynamics AX 的每个组件都必须受到保护。To enable the complete application replication and recovery, each component of Dynamics AX must be protected.

1.设置 Active Directory 和 DNS 复制1. Set up Active Directory and DNS replication

要使 Dynamics AX 应用程序正常运行,需要在灾难恢复站点上设置 Active Directory。Active Directory is required on the disaster recovery site for the Dynamics AX application to function. 根据客户本地环境的复杂性,建议使用以下两个选项。We recommend the following two choices based on the complexity of the customer’s on-premises environment.

选项 1Option 1

客户的整个本地站点有少量应用程序和一个域控制器,计划同时故障转移整个站点。The customer has a small number of applications and a single domain controller for the entire on-premises site and plans to fail over the entire site together. 建议使用 Site Recovery 复制,将域控制器计算机复制到辅助站点(适用于站点到站点和站点到 Azure 方案)。We recommend that you use Site Recovery replication to replicate the domain controller machine to a secondary site (applicable for both site-to-site and site-to-Azure scenarios).

选项 2Option 2

客户拥有大量应用程序且在运行 Active Directory 林,计划一次故障转移几个应用程序。The customer has a large number of applications and is running an Active Directory forest and plans to fail over a few applications at a time. 建议在灾难恢复站点(辅助站点或 Azure 中)设置另一域控制器。We recommend that you set up an additional domain controller on the disaster recovery site (a secondary site or in Azure).

有关详细信息,请参阅在灾难恢复站点启用域控制器For more information, see Make a domain controller available on a disaster recovery site. 本文档余下内容假设灾难恢复站点上提供了域控制器。For the remainder of this document, we assume that a domain controller is available on the disaster recovery site.

2.设置 SQL Server 复制2. Set up SQL Server replication

有关保护 SQL 层的建议选项的技术指导,请参阅使用 SQL Server 和 Azure Site Recovery 复制应用程序For technical guidance on the recommended option for protecting the SQL tier, see Replicate applications with SQL Server and Azure Site Recovery.

3.为 Dynamics AX 客户端和应用程序对象服务器 VM 启用保护3. Enable protection for the Dynamics AX client and Application Object Server VMs

根据 VM 是在 Hyper-V 还是在 VMware 上部署的,执行相关的 Site Recovery 配置。Perform relevant Site Recovery configuration based on whether the VMs are deployed on Hyper-V or VMware.


建议将“崩溃时一致”频率配置为 15 分钟。We recommend that you configure the crash-consistent frequency to 15 minutes.

以下快照显示 VMware 站点到 Azure 保护方案中 Dynamics 组件 VM 的保护状态。The following snapshot shows the protection status of Dynamics-component VMs in a VMware site-to-Azure protection scenario.


4.配置网络4. Configure networking

配置 VM 计算和网络设置Configure VM compute and network settings

对于 Dynamics AX 客户端和应用程序对象服务器 VM,请在 Site Recovery 中配置网络设置,以便在故障转移后将 VM 网络附加到适当的灾难恢复网络。For the Dynamics AX client and Application Object Server VMs, configure network settings in Site Recovery so that the VM networks get attached to the right disaster recovery network after failover. 确保可将这些层的灾难恢复网络路由到 SQL 层。Ensure that the disaster recovery network for these tiers is routable to the SQL tier.

可以在已复制的项中选择要配置网络设置的 VM,如以下快照中所示:You can select the VM in the replicated items to configure the network settings, as shown in the following snapshot:

  • 对于应用程序对象服务器,选择正确的可用性集。For Application Object Server servers, select the correct availability set.

  • 如果使用静态 IP,请在“目标 IP”文本框中指定希望 VM 采用的 IP 。If you're using a static IP, specify the IP that you want the VM to take in the Target IP text box.


5.创建恢复计划5. Create a recovery plan

可以在 Site Recovery 中创建恢复计划,将故障转移过程自动化。You can create a recovery plan in Site Recovery to automate the failover process. 在恢复计划中添加应用层和 Web 层。Add an app tier and a web tier in the recovery plan. 在不同的组中将它们排序,以便先关闭前端,再关闭应用层。Order them in different groups so that the front-end shuts down before the app tier.

  1. 在订阅中选择 Site Recovery 保管库,并选择“恢复计划” 磁贴。Select the Site Recovery vault in your subscription, and select the Recovery Plans tile.

  2. 选择“+ 恢复计划” 并指定名称。Select + Recovery plan, and specify a name.

  3. 选择“源” 和“目标” 。Select the Source and Target. 目标可以是 Azure 或辅助站点。The target can be Azure or a secondary site. 如果选择 Azure,则必须指定部署模型。If you choose Azure, you must specify the deployment model.


  4. 为恢复计划选择应用程序对象服务器和客户端 VM,然后选择 ✓。Select the Application Object Server and the client VMs for the recovery plan, and select the ✓.


    恢复计划示例:Recovery plan example:


可通过添加以下步骤来自定义 Dynamics AX 应用程序的恢复计划。You can customize the recovery plan for the Dynamics AX application by adding the following steps. 以上快照显示添加所有步骤后的完整恢复计划。The previous snapshot shows the complete recovery plan after you add all the steps.

  • SQL Server 故障转移步骤:有关 SQL Server 特定恢复步骤的信息,请参阅使用 SQL Server 和 Azure Site Recovery 复制应用程序SQL Server failover steps: For information about recovery steps specific to SQL server, see Replication applications with SQL Server and Azure Site Recovery.

  • 故障转移组 1:对应用程序对象服务器 VM 进行故障转移。Failover Group 1: Fail over the Application Object Server VMs. 确保选择的恢复点尽量靠近数据库 PIT,但不能在它的前面。Make sure that the recovery point selected is as close as possible to the database PIT, but not ahead of it.

  • 脚本:添加负载均衡器(仅限 E-A)。Script: Add load balancer (only E-A). 应用程序对象服务器 VM 组启动后,请添加一个脚本(通过 Azure 自动化),以便向其添加负载均衡器。Add a script (via Azure Automation) after the Application Object Server VM group comes up to add a load balancer to it. 可以使用脚本完成此任务。You can use a script to do this task. 有关详细信息,请参阅如何为多层应用程序灾难恢复添加负载均衡器For more information, see How to add a load balancer for multitier application disaster recovery.

  • 故障转移组 2:对 Dynamics AX 客户端 VM 进行故障转移。Failover Group 2: Fail over the Dynamics AX client VMs. 在执行恢复计划的过程中故障转移 Web 层 VM。Fail over the web tier VMs as part of the recovery plan.

执行测试故障转移Perform a test failover

有关在测试故障转移期间的 Active Directory 具体信息,请参阅“Active Directory 灾难恢复解决方案”随附的指南。For more information specific to Active Directory during test failover, see the "Active Directory disaster recovery solution" companion guide.

有关测试故障转移期间 SQL Server 的特定信息,请参阅使用 SQL Server 和 Azure Site Recovery 复制应用程序For more information specific to SQL server during test failover, see Replicate applications with SQL Server and Azure Site Recovery.

  1. 转到 Azure 门户,选择 Site Recovery 保管库。Go to the Azure portal, and select your Site Recovery vault.

  2. 选择针对 Dynamics AX 创建的恢复计划。Select the recovery plan created for Dynamics AX.

  3. 选择“测试故障转移” 。Select Test Failover.

  4. 选择虚拟网络开始测试故障转移过程。Select the virtual network to start the test failover process.

  5. 辅助环境启动后,可以执行验证。After the secondary environment is up, you can perform your validations.

  6. 完成验证后,选择“验证完成” ,随后将清理测试故障转移环境。After the validations are complete, select Validations complete and the test failover environment is cleaned.

有关执行测试故障转移的详细信息,请参阅在 Site Recovery 中执行到 Azure 的测试故障转移For more information on performing a test failover, see Test failover to Azure in Site Recovery.

执行故障转移Perform a failover

  1. 转到 Azure 门户,选择 Site Recovery 保管库。Go to the Azure portal, and select your Site Recovery vault.

  2. 选择针对 Dynamics AX 创建的恢复计划。Select the recovery plan created for Dynamics AX.

  3. 选择“故障转移” ,然后选择“故障转移” 。Select Failover, and select Failover.

  4. 选择目标网络,并选择 ✓ 开始故障转移过程。Select the target network, and select to start the failover process.

有关执行故障转移的详细信息,请参阅 Site Recovery 中的故障转移For more information on doing a failover, see Failover in Site Recovery.

执行故障回复Perform a failback

有关在故障回复期间的 SQL Server 具体注意事项,请参阅使用 SQL Server 和 Azure Site Recovery 复制应用程序For considerations specific to SQL Server during failback, see Replicate applications with SQL Server and Azure Site Recovery.

  1. 转到 Azure 门户,选择 Site Recovery 保管库。Go to the Azure portal, and select your Site Recovery vault.

  2. 选择针对 Dynamics AX 创建的恢复计划。Select the recovery plan created for Dynamics AX.

  3. 选择“故障转移” ,然后选择“故障转移” 。Select Failover, and select Failover.

  4. 选择“更改方向”。 Select Change Direction.

  5. 选择适当的选项:数据同步和 VM 创建。Select the appropriate options: data synchronization and VM creation.

  6. 选择 ✓ 开始执行故障回复过程。Select to start the failback process.

有关执行故障回复的详细信息,请参阅将 VMware VM 从 Azure 故障回复到本地For more information on doing a failback, see Failback VMware VMs from Azure to on-premises.


使用 Site Recovery 可为 Dynamics AX 应用程序创建一个完整的自动化灾难恢复计划。By using Site Recovery, you can create a complete automated disaster recovery plan for your Dynamics AX application. 发生服务中断时,可在数秒内从任何位置启动故障转移,在数分钟内启动和运行应用程序。In the event of a disruption, you can initiate the failover within seconds from anywhere and get the application up and running in minutes.

后续步骤Next steps

若要详细了解如何使用 Site Recovery 保护企业工作负荷,请参阅我可以保护哪些工作负荷?To learn more about protecting enterprise workloads with Site Recovery, see What workloads can I protect?.