Exchange Server 2010 datacenter switchover

Explains how to switchover a database availability group (DAG) across datacenters in Exchange 2010.

Who is it for?

Exchange 2010 administrators who help perform datacenter switchover for DAG in Exchange 2010.

How does it work?

We’ll take you through a series of steps that are specific to your situation.

Estimated time of completion:

30-60 minutes.

1

Welcome to the guide

Stop-DatabaseAvailabilityGroup

To start this procedure, you will use the Stop- DatabaseAvailabilityGroup cmdlet to mark a member of a database availability group (DAG) as failed, or to mark all DAG members in a specific Active Directory site as failed.

Obtain approval for datacenter switchover

Has the datacenter switchover been approved?

Before you begin the datacenter switchover, contact all those who may be affected by the switchover.

After you obtain approval by all affected parties, continue with the datacenter switchover.

Online or physically accessible DAG

Is the primary datacenter online or physically accessible?

Yes

No

0

Welcome to the guide

Stop-DatabaseAvailabilityGroup

To start this procedure, you will use the Stop- DatabaseAvailabilityGroup cmdlet to mark a member of a database availability group (DAG) as failed, or to mark all DAG members in a specific Active Directory site as failed.

Obtain approval for datacenter switchover

Has the datacenter switchover been approved?

Before you begin the datacenter switchover, contact all those who may be affected by the switchover.

After you obtain approval by all affected parties, continue with the datacenter switchover.

Online or physically accessible DAG

Is the primary datacenter online or physically accessible?

Yes

No

0

Stop-DatabaseAvailabilityGroup （Placeholder）

To start this procedure, you will use the Stop- DatabaseAvailabilityGroup cmdlet to mark a member of a database availability group (DAG) as failed, or to mark all DAG members in a specific Active Directory site as failed.

Go to the next step

0

Obtain approval for datacenter switchover（Placeholder）

Has the datacenter switchover been approved?

Before you begin the datacenter switchover, contact all those who may be affected by the switchover.

After you obtain approval by all affected parties, continue with the datacenter switchover.

Go to the next page

0

Online or physically accessible DAG（Placeholder）

Is the primary datacenter online or physically accessible?

Yes

No

0

Network Connectivity

Do the remote and primary datacenters have network connectivity?

Yes

No

0

Exchange Servers Online

Are the Exchange servers in the primary datacenter online?

Yes

No

0

DAG Extended

Is your DAG extended to multiple Active Directory sites?

Yes

No

0

Run the Stop-DatabaseAvailabilityGroup cmdlet in the shell

To stop the database availability group, follow these steps:

On a server in the recovery datacenter, use the Exchange Management Shell to run the following command:Stop-DatabaseAvailabilityGroup –Identity <DAG_Name>-ActiveDirectorySite <Primary_Site>

Repeat step 1 for all Active Directory sites that contain DAG members that are not in the recovery datacenter Active Directory site.

To verify that the command completed correctly, follow these steps:

Verify that the servers are stopped by viewing the StartedMailboxServers and StoppedMailboxServers lists for the DAG. To do this, run the following command in the shell: Get-DatabaseAvailabilityGroup –Identity <DAG_Name> | FLThe StoppedMailboxServer list should show all mailbox servers in the primary datacenter and the StartedMailboxServers list should show all mailbox servers in the recovery datacenter.

Verify that the cluster services on all Exchange servers that were accessible in the primary datacenter were forcibly cleaned up. To do this, follow these steps on all Exchange servers that were accessible in the primary datacenter:

Start Services.msc.

In the Services list, locate Cluster Service.

Verify that the parameter in the Startup Type list is set to Disabled.

Close Services.

If the Startup Type is not set to Disabled, forcibly clean up the cluster services and then verify the Startup Type again. To forcibly clean up the cluster services, run the following command at a Command Prompt on all accessible Exchange Servers: Cluster node /forcecleanup.

Note: If a domain controller in the primary datacenter is not available, the Stop-DatabaseAvailabilityGroup command may return an Active Directory provider error. This error can be safely ignored.

Did the Stop-DatabaseAvailabilityGroup command complete correctly?

Yes, go to Restore-DatabaseAvailabilityGroup

No, go to Contact Microsoft Support

0

Run the Stop-DatabaseAvailabilityGroup cmdlet in the shell

To stop the database availability group, follow these steps:

On a server in the recovery datacenter, use the Exchange Management Shell to run the following command: Stop-DatabaseAvailabilityGroup –Identity <DAG_Name> - MailboxServer <DAG_Member_InPrimary_Site>

Repeat step 1 for all DAG members that are not in the recovery datacenter.

To verify that the command completed correctly, follow these steps:

Verify that the servers are stopped by viewing the StartedMailboxServers and StoppedMailboxServers lists for the DAG. To do this, run the following command in the shell: Get-DatabaseAvailabilityGroup –Identity <DAG_Name> | FLThe StoppedMailboxServer list should show all mailbox servers in the primary datacenter and the StartedMailboxServers list should show all mailbox servers in the recovery datacenter.

Verify that the cluster services on all Exchange servers that were accessible in the primary datacenter were forcibly cleaned up. To do this, follow these steps on all Exchange servers that were accessible in the primary datacenter:

Start Services.msc.

In the Services list, locate Cluster Service.

Verify that the parameter in the Startup Type list is set to Disabled.

Close Services.

If the Startup Type is not set to Disabled, forcibly clean up the cluster services and then verify the Startup Type again. To forcibly clean up the cluster services, run the following command at a Command Prompt on all accessible Exchange Servers: Cluster node /forcecleanup.

Note: If a domain controller in the primary datacenter is not available, the Stop-DatabaseAvailabilityGroup command may return an Active Directory provider error. This error can be safely ignored.

Did the Stop-DatabaseAvailabilityGroup command complete correctly?

Yes, go to Restore-DatabaseAvailabilityGroup

No, go to Contact Microsoft Support

0

DAG Extended

Is your DAG extended to multiple Active Directory sites?

Yes

No

0

Run the Stop-DatabaseAvailabilityGroup cmdlet in the shell

To stop the database availability group, follow these steps:

On a server in the recovery datacenter, use the Exchange Management Shell to run the following command: Stop-DatabaseAvailabilityGroup –Identity <DAG_Name> - ActiveDirectorySite <Primary_Site>-ConfigurationOnly:$True

Repeat step 1 for all Active Directory sites are not the recovery datacenter.

To verify that the command completed correctly, follow these steps:

Verify that the servers are stopped by viewing the StartedMailboxServers and StoppedMailboxServers lists for the DAG. To do this, run the following command in the shell: Get-DatabaseAvailabilityGroup –Identity <DAG_Name> | FLThe StoppedMailboxServer list should show all mailbox servers in the primary datacenter and the StartedMailboxServers list should show all mailbox servers in the recovery datacenter.

Note: If a domain controller in the primary datacenter is not available, the Stop-DatabaseAvailabilityGroup command may return an Active Directory provider error. This error can be safely ignored.

Did the Stop-DatabaseAvailabilityGroup command complete correctly?

Yes, go to Restore-DatabaseAvailabilityGroup

No, go to Contact Microsoft Support

0

Run the Stop-DatabaseAvailabilityGroup cmdlet in the shell

To stop the database availability group, follow these steps:

On a server in the recovery datacenter, use the Exchange Management Shell to run the following command: Stop-DatabaseAvailabilityGroup –Identity <DAG_Name > -MailboxServer <DAG_Member_In_Primary_Site >- ConfigurationOnly:$True

Repeat step 1 for all DAG members that are not in the recovery datacenter.

To verify that the command completed correctly, follow these steps:

Verify that the servers are stopped by viewing the StartedMailboxServers and StoppedMailboxServers lists for the DAG. To do this, run the following command in the shell: Get-DatabaseAvailabilityGroup –Identity | FLThe StoppedMailboxServer list should show all mailbox servers in the primary datacenter and the StartedMailboxServers list should show all mailbox servers in the recovery datacenter.

Note: If a domain controller in the primary datacenter is not available, the Stop-DatabaseAvailabilityGroup command may return an Active Directory provider error. This error can be safely ignored.

Did the Stop-DatabaseAvailabilityGroup command complete correctly?

Yes, go to Restore-DatabaseAvailabilityGroup

No, go to Contact Microsoft Support

0

Exchange Servers Online

Are the Exchange servers in the primary datacenter online?

Yes

No

0

DAG extended to multiple Active Directory sites

Is your DAG extended to multiple Active Directory sites?

Yes

No

0

Run the Stop-DatabaseAvailabilityGroup cmdlet in the shell

To stop the database availability group, follow these steps:

On a server in the recovery datacenter, use the Exchange Management Shell to run the following command: Stop-DatabaseAvailabilityGroup –Identity <DAG_Name> -ActiveDirectorySite <Primary_Site> - ConfigurationOnly:$True

Repeat step 1 for all Active Directory sites that are not the recovery datacenter Active Directory site.

To verify that the command completed correctly, follow these steps:

Verify that the servers are stopped by viewing the StartedMailboxServers and StoppedMailboxServers lists for the DAG. To do this, run the following command in the shell: Get-DatabaseAvailabilityGroup –Identity <DAG_Name> | FL The StoppedMailboxServer list should show all mailbox servers in the primary datacenter and the StartedMailboxServers list should show all mailbox servers in the recovery datacenter.

Note: If a domain controller in the primary datacenter is not available, the Stop-DatabaseAvailabilityGroup command may return an Active Directory provider error. This error can be safely ignored.

Did the Stop-DatabaseAvailabilityGroup command complete correctly?

Yes

No, go to Contact Microsoft Support

0

Run the Stop-DatabaseAvailabilityGroup cmdlet in the shell

To stop the database availability group, follow these steps:

On a server in the recovery datacenter, use the Exchange Management Shell to run the following command: Stop-DatabaseAvailabilityGroup –Identity <DAG_Name> -MailboxServer <DAG_Member_In_Primary> - ConfigurationOnly:$True

Repeat step 1 for all DAG members that are not in the recovery datacenter Active Directory site.

To verify that the command completed correctly, follow these steps:

Verify that the servers are stopped by viewing the StartedMailboxServers and StoppedMailboxServers lists for the DAG. To do this, run the following command in the shell: Get-DatabaseAvailabilityGroup –Identity <DAG_Name> | FLThe StoppedMailboxServer list should show all mailbox servers in the primary datacenter and the StartedMailboxServers list should show all mailbox servers in the recovery datacenter.

Note: If a domain controller in the primary datacenter is not available, the Stop-DatabaseAvailabilityGroup command may return an Active Directory provider error. This error can be safely ignored.

Did the Stop-DatabaseAvailabilityGroup command complete correctly?

Yes

No, go to Contact Microsoft Support

0

Physical access to a primary data center

Complete this step if you have physical access to a primary data center that is not connected by a network. If you cannot complete this step, go to the next step.

If Exchange Management Shell access to the primary datacenter is available, run the following command: Stop-DatabaseAvailabilityGroup –Identity <DAG_Name> -ActiveDirectorySite<Primary_Site>

Repeat step 1 for all additional Active Directory sites that are not the recovery datacenter Active Directory site.

To verify that the command completed correctly, follow these steps:

Verify that the servers are stopped by viewing the StartedMailboxServers and StoppedMailboxServers lists for the DAG. To do this, run the following command in the shell: Get-DatabaseAvailabilityGroup –Identity <DAG_Name> | FLThe StoppedMailboxServer list should show all mailbox servers in the primary datacenter and the StartedMailboxServers list should show all mailbox servers in the recovery datacenter.

Verify that the cluster services on all Exchange servers that were accessible in the primary datacenter were forcibly cleaned up. To do this, follow these steps on all Exchange servers that were accessible in the primary datacenter:

Start Services.msc.

In the Services list, locate Cluster Service.

Verify that the parameter in the Startup Type list is set to Disabled.

Close Services.

If the Startup Type is not set to Disabled, forcibly clean up the cluster services and then verify the Startup Type again. To forcibly clean up the cluster services, run the following command at a Command Prompt on all accessible Exchange Servers: Cluster node /forcecleanup.

Note: If a domain controller in the primary datacenter is not available, the Stop-DatabaseAvailabilityGroup command may return an Active Directory provider error. This error can be safely ignored.

Did the Stop-DatabaseAvailabilityGroup command complete correctly?

Yes, go to Restore-DatabaseAvailabilityGroup

No, go to Contact Microsoft Support

0

DAG extended to multiple Active Directory sites

Is your DAG extended to multiple Active Directory sites?

Yes

No

0

Run the Stop-DatabaseAvailabilityGroup cmdlet in the shell

To stop the database availability group, follow these steps:

On a server in the recovery datacenter, use the Exchange Management Shell to run the following command: Stop-DatabaseAvailabilityGroup –Identity <DAG_Name> -ActiveDirectorySite<Primary_Datacenter> -ConfigurationOnly: $True

Repeat step 1 for all Active Directory sites that are not the recovery datacenter Active Directory site.

To verify that the command completed correctly, follow these steps:

Verify that the servers are stopped by viewing the StartedMailboxServers and StoppedMailboxServers lists for the DAG. To do this, run the following command in the shell: Get-DatabaseAvailabilityGroup –Identity <DAG_Name> | FLThe StoppedMailboxServer list should show all mailbox servers in the primary datacenter and the StartedMailboxServers list should show all mailbox servers in the recovery datacenter.

Note: If a domain controller in the primary datacenter is not available, the Stop-DatabaseAvailabilityGroup command may return an Active Directory provider error. This error can be safely ignored.

Did the Stop-DatabaseAvailabilityGroup command complete correctly?

Yes, go to Restore-DatabaseAvailabilityGroup

No, go to Contact Microsoft Support

0

Run the Stop-DatabaseAvailabilityGroup cmdlet in the shell

To stop the database availability group, follow these steps:

On a server in the recovery datacenter, use the Exchange Management Shell to run the following command: Stop-DatabaseAvailabilityGroup –Identity <DAG_Name > -MailboxServer <DAG_Member_In_Primary_Site > -ConfigurationOnly:$True

Repeat step 1 for all DAG members that are not in the recovery datacenter.

To verify that the command completed correctly, follow these steps:

Verify that the servers are stopped by viewing the StartedMailboxServers and StoppedMailboxServers lists for the DAG. To do this, run the following command in the shell: Get-DatabaseAvailabilityGroup –Identity <DAG_Name > | FLThe StoppedMailboxServer list should show all mailbox servers in the primary datacenter and the StartedMailboxServers list should show all mailbox servers in the recovery datacenter.

Note: If a domain controller in the primary datacenter is not available, the Stop-DatabaseAvailabilityGroup command may return an Active Directory provider error. This error can be safely ignored.

Did the Stop-DatabaseAvailabilityGroup command complete correctly?

Yes, go to Restore-DatabaseAvailabilityGroup

No, go to Contact Microsoft Support

0

You have physical access to a primary data center that is not connected by a network

Complete this step if you have physical access to a primary data center that is not connected by a network. If you cannot complete this step, go to the next step.

If Exchange Management Shell access to the primary datacenter is available, run the following command: Stop-DatabaseAvailabilityGroup –Identity <DAG_Name> -MailboxServer <DAG_Member_In_Primary_Site>

Repeat step 1 for all DAG members that are not in the recovery datacenter.

To verify that the command completed correctly, follow these steps:

Verify that the servers are stopped by viewing the StartedMailboxServers and StoppedMailboxServers lists for the DAG. To do this, run the following command in the shell: Get-DatabaseAvailabilityGroup –Identity <DAG_Name> | FLThe StoppedMailboxServer list should show all mailbox servers in the primary datacenter and the StartedMailboxServers list should show all mailbox servers in the recovery datacenter.

Note: If a domain controller in the primary datacenter is not available, the Stop-DatabaseAvailabilityGroup command may return an Active Directory provider error. This error can be safely ignored.

Did the Stop-DatabaseAvailabilityGroup command complete correctly?

Yes, go to Restore-DatabaseAvailabilityGroup

No, go to Contact Microsoft Support

0

DAG extended to multiple Active Directory sites

Is your DAG extended to multiple Active Directory sites?

Yes

No

0

Run the Stop-DatabaseAvailabilityGroup cmdlet in the shell

To stop the database availability group when you have Exchange Management Shell access to the primary datacenter, follow these steps:

On a server in the recovery datacenter, use the Exchange Management Shell to run the following command: Stop-DatabaseAvailabilityGroup –Identity <DAG_Name> -ActiveDirectorySite <Primary_Site> -ConfigurationOnly:$True

Repeat step 1 for all Active Directory sites that are not the recovery datacenter Active Directory site.

To verify that the command completed correctly, follow these steps:

Verify that the servers are stopped by viewing the StartedMailboxServers and StoppedMailboxServers lists for the DAG. To do this, run the following command in the shell: Get-DatabaseAvailabilityGroup –Identity <DAG_Name> | FLThe StoppedMailboxServer list should show all mailbox servers in the primary datacenter and the StartedMailboxServers list should show all mailbox servers in the recovery datacenter.

Note: If a domain controller in the primary datacenter is not available, the Stop-DatabaseAvailabilityGroup command may return an Active Directory provider error. This error can be safely ignored.

Did the Stop-DatabaseAvailabilityGroup command complete correctly?

Yes, go to Restore-DatabaseAvailabilityGroup

No, go to Contact Microsoft Support

0

Run the Stop-DatabaseAvailabilityGroup cmdlet in the shell

To stop the database availability group, follow these steps:

On a server in the recovery datacenter, use the Exchange Management Shell to run the following command: Stop-DatabaseAvailabilityGroup –Identity <DAG_Name> -MailboxServer <DAG_Member_In_Primary_Site>- ConfigurationOnly:$True

Repeat step 1 for all DAG members that are not in the recovery datacenter.

To verify that the command completed correctly, follow these steps:

Verify that the servers are stopped by viewing the StartedMailboxServers and StoppedMailboxServers lists for the DAG. To do this, run the following command in the shell: Get-DatabaseAvailabilityGroup –Identity <DAG_Name> | FLThe StoppedMailboxServer list should show all mailbox servers in the primary datacenter and the StartedMailboxServers list should show all mailbox servers in the recovery datacenter.

Note: If a domain controller in the primary datacenter is not available, the Stop-DatabaseAvailabilityGroup command may return an Active Directory provider error. This error can be safely ignored.

Did the Stop-DatabaseAvailabilityGroup command complete correctly?

Yes, go to Restore-DatabaseAvailabilityGroup

No, go to Contact Microsoft Support

0

Restore-DatabaseAvailabilityGroup

Before you can start the Restore-DatabaseAvailabilityGroup procedure, the Stop- DatabaseAvailabilityGroup must be completed successfully.

Did Stop-DatabaseAvailabilityGroup complete successfully?

Yes, I now want to use the Restore-DatabaseAvailabilityGroup cmdlet as part of a datacenter switchover of a DAG

No, go to Contact Microsoft Support

0

Stop the Cluster service on each DAG member in the recovery datacenter

To stop the Cluster service on each DAG member in the recovery datacenter, follow these steps:

At a command prompt, run one of the following commands, depending on the operating system being used by the DAG member:

For Windows Server 2008 R2, run the command Stop-Service Clussvc

For Windows Server 2008 SP2, run the command Net Stop Clussvc

Note: You must use an elevated command prompt (run as administrator) if the default administrator account is not used. If the command is not run as an administrator, you receive the error message "Access denied".

Cluster services are stopped on remaining nodes.

Is the Cluster service stopped on all DAG members in your recovery datacenter?

Yes, go to the next page

No, go to Contact Microsoft Support

0

The Cluster service must be stopped(Placeholder)

Is the Cluster service stopped on all DAG members in your recovery datacenter?

Yes, go to the next page

No, go to Contact Microsoft Support

0

Run the Restore-DatabaseAvailabilityGroup cmdlet in the shell

To restore the database availability group, follow these steps:

On a server in the recovery datacenter, use the Exchange Management Shell to run the following command:

A DAG member in the recovery datacenter is randomly selected and its Cluster service is started in /forceQuourm mode

DAG members on the StoppedMailboxServers list are evicted from the DAG's cluster. This adjusts the membership count

If the resulting membership count is EVEN or results in a SINGLE node, the Cluster is configured by using a Node and File Share Majority quorum and it begins to use the Alternate Witness Server and Alternate Witness Directory

Cluster services are started on the remaining DAG members and they successfully join the DAG's cluster

Verify that the DAG members are up and the Cluster Group is online.

To do this on a computer that is running Windows Server 2008 R2, run the following commands within powershell:

Import-Module FailoverClusters

Get-ClusterNode –Cluster <DAG_Name>

Get-ClusterGroup –Cluster <DAG_Name>

To do this on a computer that is running Windows Server 2008 SP2, run the following commands at a command prompt:

Services(Placeholder)

Verify network connectivity between all DAG members

To verify that all the DAG members are connected on the network, use one of the following methods:

Use the Ping command to test network connectivity between DAG members

Map administrative shares between DAG members to test network connectivity

After you verify that connectivity between datacenters is functioning and all cluster inter-node communications are operating correctly, go to the next step.

Have datacenter communications been verified to be working correctly?

Yes

No

0

Network connectivity verified(Placeholder)

Have datacenter communications been verified to be working correctly?

Yes

No

0

DAG members Cluster service startup type Disabled

Verify that Cluster service on the DAG members in the primary datacenter have startup type set to Disabled. If they do not, either the Stop-DatabaseAvailabilityGroup command was not successful or the DAG members in the primary datacenter did not receive eviction notification after network connectivity between datacenters was restored.

Follow these steps on all Exchange servers that were accessible in the primary datacenter:

Start Services.msc.

In the Services list, locate Cluster Service.

Verify that the parameter in the Startup Type list is set to Disabled.

Close Services.

If Cluster service cleanup has not occurred and Cluster service does not have the startup type set to Disabled, forcibly clean up the cluster services on the DAG members in the primary datacenter. To do this, run the following command at a Command Prompt on all DAG members: Cluster node /forcecleanup

Contact Microsoft Support

On the Create an incident webpage, click Clustering and High Availability (Including Deployment) in the Problem type list, click Database Availability Group (DAG) in the Category list, and then click Start request in the Contact Microsoft area.