2. Managing Availability Group Membership
When you add a server to a database availability group, the server
works with the other servers in the group to provide automatic,
database-level recovery from database, server, and network failures. To
be included in a database availability group, a server must be running
Windows Server 2008 SP2 Enterprise or later or Windows Server 2008 R2
or later and must have at least two network interface cards. Each
network interface card must be on a different subnet.
Note
Each server that you want to add to the database availability group must have two network adapter cards. The first network adapter, referred to as the replication adapter, handles replication traffic, and the second adapter, referred to as the messaging adapter, handles MAPI network traffic and other traffic originating outside the replication network.
Keep the following in mind when planning database availability group membership:
-
If you created the availability group using the Exchange Management
Console and want to add servers to the group by using the Exchange
Management Console, at least one of the server's network cards must be
configured to use Dynamic Host Configuration Protocol (DHCP). When you
add the first Mailbox server to the database availability group, the
group must be assigned an IP address. By default, Exchange uses DHCP to
obtain an IP address for the group. This IP address becomes the IP
address for the group. Alternatively, you can create the group by using
the Exchange Management Shell. Use New-DatabaseAvailabilityGroup and
set the IP address using the –DatabaseAvailabilityGroupIp parameter.
-
If you no longer want a server to be a member of a group, you can
remove it from the group and the server will no longer be automatically
protected from failures. Keep in mind that you must remove all
replicated database copies from a server before you can remove it from
a database availability group.
-
If you didn't create the group and set its IP address by using
Exchange Management Shell and DHCP is not available in your
organization, or if you want to use a static IP address for an
availability group, you can use the
–DatabaseAvailablityGroupIpAddresses parameter of the
Set-DatabaseAvailabilityGroup cmdlet to specify a static IP address for
the group prior to adding servers. The IP address is needed prior to
adding the first Mailbox server to the group.
You can add a Mailbox server to or remove a Mailbox server from a database availability group by completing the following steps:
-
In the Exchange Management Console, expand the Organization
Configuration node and then select the related Mailbox node. In the
results pane, select the Database Availability Group tab to view
existing availability groups, as shown in Figure 2.
-
Right-click the database availability group you want to work with and then select Manage Database Availability Group Membership. On the Manage Database Availability Group Membership page, shown in Figure 3 you can
-
Click Add to add a server to the database availability group. In the
Select Mailbox Server dialog box, select one or more servers and then
click OK.
-
Select a server from the list of current members, and click the red X to remove the server from the database availability group.
-
Click Manage to apply your changes. On the Completion page, the
Summary states whether the operation was successful. If an error
occurred, you need to take the appropriate corrective action.
Otherwise, click Finish.
In the Exchange Management Shell, you can list database availability groups using Get-DatabaseAvailabilityGroup.
If you enter Get-DatabaseAvailabilityGroup without additional
parameters, you'll see a list of all availability groups in the current
Active Directory forest as well as the member servers and operational
servers for those groups, as shown in the following example and sample
output:
Get-DatabaseAvailabilityGroup
Name Member Servers Operational Servers
---- -------------- -------------------
EastCampusDAG1 MailServer25, CorpServer27 MailServer25, CorpServer27
WestCampusDAG1 MailServer44, MailServer18 MailServer44, MailServer18
Use the –Identity parameter to specify the name of the database
availability group to query. Add –Status to any query to include
real-time status information.
You add or remove group members using Add-DatabaseAvailabilityGroupServer and Remove-DatabaseAvailabilityGroupServer. Samples Example 1 and Example 2 provide the syntax and usage.
Example 1. Add-DatabaseAvailabilityGroupServer cmdlet syntax and usage
Syntax
Add-DatabaseAvailabilityGroupServer -Identity DAGName
-MailboxServer ServerToAdd
[-DomainController FullyQualifiedName
]
Usage
Add-DatabaseAvailabilityGroupServer -Identity "EastCampusDAG1"
-MailboxServer "MailServer62"
Example 2. Remove-DatabaseAvailabilityGroupServer cmdlet syntax and usage
Syntax
Remove-DatabaseAvailabilityGroupServer -Identity DAGName
-MailboxServer ServerToAdd
[-ConfigurationOnly <$true | $false>]
[-DomainController FullyQualifiedName
]
Usage
Remove-DatabaseAvailabilityGroupServer -Identity "EastCampusDAG1"
-MailboxServer "MailServer62"
If a Mailbox server has failed and cannot be recovered, you can recover operations in one of two ways:
-
You can use the Remove-DatabaseAvailabilityGroupServer cmdlet to
remove the configuration settings for the Mailbox server from the
database availability group. After you remove the configuration
settings, all settings associated with the Mailbox server are gone.
-
You can install Exchange on a server that has the same name and domain membership
as the old server and use Exchange Server 2010 Setup with the
/m:RecoverServer switch. Running Setup with the /m:RecoverServer switch
causes Setup to read the failed server's configuration information from
Active Directory. After Setup gathers the server's configuration
information from Active Directory, Setup installs the original Exchange
files and services on the server, restoring the roles and settings that
were stored in Active Directory.