创建数据库可用性组Create a database availability group

适用于: Exchange Server 2013Applies to: Exchange Server 2013

数据库可用性组 (DAG) 是一组 Microsoft Exchange Server 2013 邮箱服务器(最多 16 个),提供从数据库、服务器或网络故障中自动执行数据库级恢复的功能。将邮箱服务器添加到 DAG 后,此服务器与 DAG 中的其他服务器协同工作,提供从数据库、服务器和网络故障中自动执行数据库级恢复的功能。A database availability group (DAG) is a set of up to 16 Microsoft Exchange Server 2013 Mailbox servers that provide automatic database-level recovery from a database, server, or network failure. When a Mailbox server is added to a DAG, it works with the other servers in the DAG to provide automatic, database-level recovery from database, server, and network failures.

要查找与 DAG 相关的其他管理任务吗?请查看管理数据库可用性组Looking for other management tasks related to DAGs? Check out Managing database availability groups.

在开始之前,您需要知道什么?What do you need to know before you begin?

  • 估计完成时间:1 分钟Estimated time to complete: 1 minute

  • 您必须先获得权限,然后才能执行此过程或多个过程。若要查看所需的权限,请参阅 高可用性和站点恢复权限主题中的"数据库可用性组"条目。You need to be assigned permissions before you can perform this procedure or procedures. To see what permissions you need, see the "Database availability groups" entry in the High availability and site resilience permissions topic.

  • 在创建包含运行 Windows Server 2012 的邮箱服务器的 DAG 时,在向 DAG 添加成员之前必须预留群集名称对象 (CNO)。如果您创建的 DAG 不包含管理访问点,但具有运行 Windows Server 2012 R2 的邮箱服务器,则无需为 DAG 预先暂存 CNO。有关详细步骤,请参阅为数据库可用性组预留群集名称对象When creating a DAG with Mailbox servers running Windows Server 2012, you must pre-stage the cluster name object (CNO) before adding members to the DAG. If you are creating a DAG without an administrative access point with Mailbox servers running Windows Server 2012 R2, then you do not need to pre-stage a CNO for the DAG. For detailed steps, see Pre-stage the cluster name object for a database availability group.

  • 创建 DAG 时,请为 DAG 提供最多 15 个字符的唯一名称。除了为 DAG 提供名称,还必须为 DAG 分配一个或多个 IP 地址(都为 IPv4,或同时包含 IPv4 和 IPv6),除非创建的 Windows Server 2012 R2 DAG 不包含管理访问点并且未向 DAG 分配任何 IP 地址。否则,分配的 IP 地址必须处在用于 MAPI 网络的每个子网上,且必须可用。如果您指定一个或多个 IPv4 地址,并且您的系统已配置为使用 IPv6,该任务还会尝试自动为 DAG 分配一个或多个 IPv6 地址。When creating a DAG, you provide a unique name for the DAG of up to 15 characters. In addition to providing a name for the DAG, you must also assign one or more IP addresses (either IPv4 or both IPv4 and IPv6) to the DAG, unless you are creating a Windows Server 2012 R2 DAG without an administrative access point and you are not assigning any IP addresses to the DAG. Otherwise, the IP addresses you assign must be on each subnet intended for the MAPI network and must be available for use. If you specify one or more IPv4 addresses and your system is configured to use IPv6, the task will also attempt to automatically assign the DAG one or more IPv6 addresses.

  • 在创建 DAG 时,可以选择指定见证服务器和见证目录。如果要指定见证服务器,建议使用没有安装邮箱服务器角色的客户端访问服务器。这可让 Exchange 管理员了解见证的可用性,并且它可确保使用见证服务器必需的所有安全权限都已准备好。When creating a DAG, you can optionally specify a witness server and witness directory. If you specify a witness server, we recommend that you use a Client Access server that doesn't have the Mailbox server role installed. This allows an Exchange administrator to be aware of the availability of the witness, and it ensures that all of the necessary security permissions needed for using the witness server are in place.

    可以使用以下选项和行为组合:The following combinations of options and behaviors are available:

    • 可以仅指定 DAG 的名称,将“见证服务器”和“见证目录”字段留空。在此情况下,任务将搜索未安装邮箱服务器角色的客户端访问服务器。系统将自动在该客户端访问服务器上创建默认见证目录并共享该目录,并配置 DAG 以使用该服务器作为其见证服务器。You can specify only a name for the DAG and leave the Witness server and Witness directory fields empty. In this scenario, the task will search for a Client Access server that doesn't have the Mailbox server role installed. It will automatically create the default witness directory and share on that Client Access server and configure the DAG to use that server as its witness server.

    • 可以指定 DAG 的名称、要使用的见证服务器以及要在见证服务器上创建并共享的目录。You can specify a name for the DAG, the witness server that you want to use, and the directory you want created and shared on the witness server.

    • 可以指定 DAG 的名称、要使用的见证服务器,并将“见证目录”字段留空。在这种情况下,任务将在指定的见证服务器上创建默认见证目录。You can specify a name for the DAG and the witness server that you want to use, and leave the Witness directory field empty. In this scenario, the task will create the default witness directory on the specified witness server.

    • 可以指定 DAG 的名称、将“见证服务器”字段留空,并指定要在见证服务器上创建并共享的目录。在这种情况下,向导将搜索没有安装邮箱服务器角色的客户端访问服务器,在该服务器上自动创建并共享指定的见证目录,然后配置 DAG 以使用该客户端访问服务器作为其见证服务器。You can specify a name for the DAG, leave the Witness server field empty, and specify the directory you want created and shared on the witness server. In this scenario, the wizard will search for a Client Access server that doesn't have the Mailbox server role installed, and it will automatically create the specified witness directory on that server, share the directory, and configure the DAG to use that Client Access server as its witness server.

      重要

      如果您指定的见证服务器不是 Exchange 2013 或 Exchange 2010 服务器,则必须将 Exchange 受信任子系统通用安全组添加到见证服务器上的本地管理员组中。If the witness server you specify isn't an Exchange 2013 or Exchange 2010 server, you must add the Exchange Trusted Subsystem universal security group to the local Administrators group on the witness server. 需要这些安全权限来确保 Exchange 可以根据需要在见证服务器上创建并共享目录。These security permissions are necessary to ensure that Exchange can create a directory and share on the witness server as needed. 如果未配置正确权限,将会返回以下错误:If the proper permissions aren't configured, the following error is returned:
      Error: An error occurred during discovery of the database availability group topology. Error: An error occurred while attempting a cluster operation. Error: Cluster API "AddClusterNode() (MaxPercentage=12) failed with 0x80070005. Error: Access is denied."

  • 若要了解本主题中的过程可能适用的键盘快捷键,请参阅 Exchange 管理中心内的键盘快捷键For information about keyboard shortcuts that may apply to the procedures in this topic, see Keyboard shortcuts in the Exchange admin center.

提示

是否有任何疑问?Having problems? 在 Exchange 论坛中寻求帮助。Ask for help in the Exchange forums. 请访问 以下论坛Exchange Server。Visit the forums at Exchange Server.

使用 EAC 创建数据库可用性组Use the EAC to create a database availability group

  1. In the EAC, go to Servers > Database Availability Groups.In the EAC, go to Servers > Database Availability Groups.

  2. 单击 "添加图标 "创建 DAG。Click Add Icon to create a DAG.

  3. 在“新建数据库可用性组”页上,提供 DAG 的以下信息:On the new database availability group page, provide the following information for the DAG:

    • 数据库可用性组名称:使用此字段为 DAG 键入最多 15 个字符的有效唯一名称。Database availability group name: Use this field to type a valid and unique name for the DAG of up to 15 characters. 该名称等同于计算机名,相应的 CNO 将使用该名称在 Active Directory 中创建。The name is equivalent to a computer name, and a corresponding CNO will be created in Active Directory with that name. 该名称将同时为 DAG 和基础群集的名称。This name will be both the name of the DAG and the name of the underlying cluster.

    • 见证服务器:使用此字段指定 DAG 的见证服务器。Witness server: Use this field to specify a witness server for the DAG. 如果将该字段留空,系统将尝试自动选择没有安装于计算机上的本地 Active Directory 站点中的客户端访问服务器,并将邮箱服务器用作见证服务器。If you leave this field blank, the system will attempt to automatically select a Client Access server in the local Active Directory site that isn't installed on a computer with the Mailbox server to be used as the witness server.

      备注

      如果指定见证服务器,则必须使用主机名 (FQDN) 或完全限定的域名 (FQDN)。不支持使用 IP 地址或通配符名称。此外,见证服务器不能是 DAG 的成员。If you specify a witness server, you must use either a host name or a fully qualified domain name (FQDN). Using an IP address or a wildcard name isn't supported. In addition, the witness server can't be a member of the DAG.

    • 见证目录:使用此字段键入将用于存储见证数据的见证服务器上目录的路径。Witness directory: Use this field to type the path to a directory on the witness server that will be used to store witness data. 如果该目录不存在,系统将会在见证服务器上为您创建该目录。If the directory doesn't exist, the system will create it for you on the witness server. 如果将此字段留空,将在见证 (%SystemDrive% \ DAGFileShareWitnesses) 创建 \ <DAG FQDN> 默认目录。If you leave this field blank, the default directory (%SystemDrive%\DAGFileShareWitnesses\<DAG FQDN>) will be created on the witness server.

    • 数据库可用性组 IP 地址:使用此字段向 DAG 分配一个或多个静态 IPv4 地址。Database availability group IP addresses: Use this field to assign one or more static IPv4 addresses to the DAG. 输入 IPv4 地址,然后单击 "添加图标 "进行添加。Enter an IPv4 address and click Add Icon to add it. 如果希望 DAG 使用动态主机配置协议 (DHCP) 获取必要的 IPv4 地址,则将该字段留空。Leave this field blank if you want the DAG to use Dynamic Host Configuration Protocol (DHCP) to obtain the necessary IPv4 addresses. 或者,输入 255.255.255.255 以创建不含 IP 地址或群集管理访问点的 DAG,这仅适用于将包含运行 Windows Server 2012 R2 的邮箱服务器的 DAG。Optionally, enter 255.255.255.255 to create a DAG without an IP address or cluster administrative access point, which applies only to DAGs that will contain Mailbox servers running Windows Server 2012 R2.

  4. 单击“保存”以创建 DAG。Click Save to create the DAG.

使用命令行管理程序创建数据库可用性组Use the Shell to create a database availability group

此示例创建配置为使用见证服务器 FILESRV1 和本地目录 C: \ DAG1 的 DAG DAG1。This example creates the DAG DAG1 that's configured to use the witness server FILESRV1 and the local directory C:\DAG1. DAG1 还配置为对 DAG 的 IP 地址使用 DHCP。DAG1 is also configured to use DHCP for the DAG's IP addresses.

New-DatabaseAvailabilityGroup -Name DAG1 -WitnessServer FILESRV1 -WitnessDirectory C:\DAG1

此示例创建名为 DAG2 的 DAG。系统会自动选择位于不包含邮箱服务器角色的本地 Active Directory 站点中的客户端访问服务器作为 DAG 的见证服务器。由于本例中的所有 DAG 成员的 MAPI 网络都位于同一子网中,因此为 DAG2 分配了一个静态 IP 地址。This example creates the DAG DAG2. The system automatically selects a Client Access server in the local Active Directory site that does not contain the Mailbox server role as the DAG's witness server. DAG2 is assigned a single static IP address because in this example all DAG members have the MAPI network on the same subnet.

New-DatabaseAvailabilityGroup -Name DAG2 -DatabaseAvailabilityGroupIPAddresses 10.0.0.8

此示例创建名为 DAG3 的 DAG。This example creates the DAG DAG3. DAG3 配置为使用见证服务器 MBX2 和本地目录 \ C:DAG3。DAG3 is configured to use the witness server MBX2 and the local directory C:\DAG3. 由于 DAG3 的 DAG 成员所处的 MAPI 网络位于不同子网中,因此为 DAG3 分配了多个静态 IP 地址。DAG3 is assigned multiple static IP addresses because its DAG members are on different subnets on the MAPI network.

New-DatabaseAvailabilityGroup -Name DAG3 -WitnessServer MBX2 -WitnessDirectory C:\DAG3 -DatabaseAvailabilityGroupIPAddresses 10.0.0.8,192.168.0.8

此示例创建配置为使用 DHCP 的名为 DAG4 的 DAG。此外,系统将自动选择见证服务器,并创建默认的见证目录。This example creates the DAG DAG4 that's configured to use DHCP. In addition, the witness server will be automatically selected by the system, and the default witness directory will be created.

New-DatabaseAvailabilityGroup -Name DAG4

本示例创建的 DAG DAG5 不包含管理访问点(仅对 Windows Server 2012 R2 DAG 有效)。此外,MBX4 将用作 DAG 的见证服务器,并将创建默认的见证目录。This example creates the DAG DAG5 that will not have an administrative access point (valid for Windows Server 2012 R2 DAGs only). In addition, MBX4 will be used as the witness server for the DAG, and the default witness directory will be created.

New-DatabaseAvailabilityGroup -Name DAG5 -DatabaseAvailabilityGroupIPAddresses ([System.Net.IPAddress]::None) -WitnessServer MBX4

您如何知道这有效?How do you know this worked?

若要验证是否成功创建了 DAG,请执行以下操作之一:To verify that you've successfully created a DAG, do one of the following:

  • In the EAC, navigate to Servers > Database Availability Groups. The newly created DAG is displayed.In the EAC, navigate to Servers > Database Availability Groups. The newly created DAG is displayed.

  • 在 Shell 中,运行以下命令检查是否已创建 DAG 并显示 DAG 属性信息。In the Shell, run the following command to verify the DAG was created and to display DAG property information.

    Get-DatabaseAvailabilityGroup <DAGName> | Format-List
    

详细信息For more information

数据库可用性组 (DAG)Database availability groups (DAGs)

配置数据库可用性组属性Configure database availability group properties

Set-DatabaseAvailabilityGroupSet-DatabaseAvailabilityGroup

New-DatabaseAvailabilityGroupNew-DatabaseAvailabilityGroup

New-DatabaseAvailabilityGroupNetworkNew-DatabaseAvailabilityGroupNetwork

Add-DatabaseAvailabilityGroupServerAdd-DatabaseAvailabilityGroupServer