5. Removing Servers from a Database Availability Group
Before you can remove a server from a database availability group,
you must also remove all database copies from the server. To remove
member servers from a DAG, right-click the DAG, and then click Manage
Database Availability Group Membership. On the Manage Database
Availability Group Membership page, select each server on the list of
current members, and then click the red X to remove the servers from
the database availability group. Click Manage, and then click Finish.
After you remove the member servers, you can remove the database
availability group by right-clicking it and selecting Remove. When
prompted to confirm, click Yes.
6. Removing Database Availability Groups
You can remove a database availability group only if it has no
member servers. Therefore, before you can remove a database
availability group, you must first remove any member servers from the
group.
You can remove an empty availability group by completing the following steps:
-
In the Exchange Management Console, expand the Organization Configuration node and then select the related Mailbox node.
-
On the Database Availability Group tab, right-click the database availability group you want to remove and then select Remove.
-
When prompted to confirm the action, click Yes.
In the Exchange Management Shell, you can remove database availability groups using the Remove-DatabaseAvailabilityGroup cmdlet. Example 7 provides the syntax and usage.
Example 7. Remove-DatabaseAvailabilityGroup cmdlet syntax and usage
Syntax
Remove-DatabaseAvailabilityGroup -Identity DAGName
[-DomainController FullyQualifiedName
]
Usage
Remove-DatabaseAvailabilityGroup -Identity "EastCampusDAG1"
7. Switching over Servers and Databases
The Microsoft Exchange Information Store service manages the active
and passive databases configured on a Mailbox server. To improve
performance, the service running on each server maintains a database
cache of changes to active databases that haven't been applied to
passive copies. In the event of a failover or switchover,
the service can apply the changes in the cache to a passive copy and
then make the passive copy the active copy. Most of the time, failover
completes in about 30 seconds.
The difference between failover and switchover is important. When
Exchange detects a failure of an active database, regardless of whether
it is from database failure, server failure, or network failure,
Exchange uses failover processes to mark the active database as
inactive and dismount it and then mount and mark a passive database
copy as the active copy. Prior to performing maintenance on a server or
for testing or troubleshooting, you might want Exchange to switch from
one database to another by marking an active database as inactive and
then marking a passive database copy as the active copy.
Failover and switchover occur at the database level for individual
databases and at the server level for all active databases hosted by a
server. When either a switchover or failover occurs, other Exchange
2010 server roles become aware of the switchover almost immediately and redirect client and messaging traffic automatically as appropriate.
You can switch over all active databases on a server by completing the following steps:
-
In the Exchange Management Console, expand the Server Configuration node and then select the related Mailbox node.
-
In the main pane, right-click the server that you are performing
maintenance on, testing, or troubleshooting and then select Switchover
Server.
-
In the Activate Database Copy dialog box, shown in Figure 6
the default option is to allow Exchange to handle the switchover and
select a server to take over the databases from the source server
automatically. To accept the default, click OK. Otherwise, click Use
The Specified Target Server and then click Browse. In the Select
Mailbox Server dialog box, select the server to take over, click OK,
and then click OK again to close the Switchover Server Database Copies
dialog box. Keep in mind that you can select only a server that is
already a member of the database availability group. You can't have
copies outside the group either.
-
When prompted to confirm the action, click Yes.
You can perform a switchover of an individual database by completing the following steps:
-
In the Exchange Management Console, expand the Organization
Configuration node and then select the related Mailbox node. In the
main pane, select the Database Management tab.
-
In the upper pane, click the database you want to work with. In the
lower pane, you see the available database copies. The database copies
are listed according to their copy status. Only the active copy will
have a status of Mounted. All other database copies will display the
current status of replication for the database copy.
-
Right-click the passive copy you want to activate, and then click Activate Database Copy.
-
Every mailbox server has a database automount setting and the
default is Best Availability. If you want to use the default automount
setting, accept the default value of None in the Activate Database Copy
dialog box and then click OK. Otherwise, override
the default database mount settings by selecting a value other than
None on the Override Mount Dial list and then clicking OK. Values you
can select to control the database mount behavior include:
-
Lossless The
database does not automatically mount until all logs that were
generated on the original source server have been copied to the target
node.
-
Good Availability
The database automatically mounts if the copy queue length is less than
or equal to 6. If the queue length is greater than 6, Exchange attempts
to replicate the remaining logs to the target server and mounts the
databases once the queue length is less than or equal to 6.
-
Best Availability
The database automatically mounts if the copy queue length is less than
or equal to 12. The copy queue length is the number of logs that need
to be replicated. If the queue length is greater than 12, Exchange
attempts to replicate the remaining logs to the target server and
mounts the databases once the queue length is less than or equal to 12.
Note
You can set the
default database automount setting for a mailbox server using the
–AutoDatabaseMountDail parameter of the Set-MailboxServer cmdlet. If
you specify either Best Availability or Good Availability and all of
the data has not been replicated to the target server, you might lose
some mailbox data. However, the transport dumpster feature (which is
enabled by default) helps protect against data loss by resubmitting
messages that are in the transport dumpster queue. Because of latency
problems or other issues, specifying one of these values can result in
a database not being mounted, and you might need to use the
-AcceptDataLoss parameter with Mount-Database to force the database to
mount after a specified amount of time.
-
When you click OK, Exchange will dismount the current active mailbox
database, and establish the previously selected database copy as the
active mailbox database.
When you are working with the Exchange Management Shell, you can initiate switchover using Move-ActiveMailboxDatabase. Example 8 shows the syntax and usage.
Example 8. Move-ActiveMailboxDatabase cmdlet syntax and usage
Syntax
Move-ActiveMailboxDatabase -Identity DatabaseName
[-SkipClientExperienceChecks <$true | $false>] [-SkipHealthChecks
<$true | $false>] [SkipLagChecks <$true | $false>] {AddtlParams}
Move-ActiveMailboxDatabase -Server ServerName
{AddtlParams}
{AddtlParams}
[-ActivateOnServer ServerOnWhichToActivate
] [-MountDialOverride
{"Lossless" | "GoodAvailability" | "BestAvailability"
| "None"} [-DomainController FullyQualifiedName
]
[-TerminateOnWarning <$true | $false>]
Usage
Move-ActiveMailboxDatabase -Identity "Engineering Primary Database"
-ActivateOnServer "MailServer86" -MountDialOverride "Lossless"