[Step By Step] Exchange Server 2010: Creating a DAG + Failover and Switchover Simulation
Hello, friends! This time I bring you a tutorial that details the creation of a DAG in Exchange Server 2010, creating database copies and verifying the platform's high availability (switchover and failover). I hope it is useful to you. Cont
AI-assisted translation, approved by Mateo.
Contents
- Objective
- Scope
- Introduction
- Creating a DAG in Exchange Server 2010
- Adding database copies
- Database switchover
- Database failover: ServiceDown Simulation
Objective
The objective of this article is to detail the steps required to create and configure a DAG in Exchange Server 2010. After the DAG is created, the high availability it provides (Failover and Switchover) will be tested.Scope
The scope of this article is:- Creating a DAG in Exchange Server 2010.
- Configuring 2 servers in the DAG.
- Adding 2 databases to the DAG.
- High Availability test.
Introduction
What is a DAG? A DAG (Database Availability Group), or database availability group, is a core high-availability component in Exchange Server 2010. A DAG is a group of Mailbox Servers that provide automatic recovery at the database level for failures affecting an entire server or a particular database. It can also be identified as a database replication boundary, including their failover and switchover (this is done through a component called Active Manager, which manages and controls these processes). This post details how to create a DAG with 2 Exchange Server 2010 Mailbox servers and 2 databases, perform the required basic configurations, add database copies, and finally simulate a Switchover and a Failover to verify how databases behave under high availability.Creating a DAG in Exchange Server 2010
We will create the DAG through the EMC console:- Go to Organization Configuration>Mailbox>Database Availability Groups. Then right-click and select “New Database Availability Group” (we can also access it from the action pane):
- The DAG creation wizard will open. We will specify the name and leave the Witness Server and Directory options unchecked. We must do this if there is a server in the Exchange organization with the Hub Transport role and without the Mailbox role, since Exchange will automatically use this Hub Transport server as the Witness Server and automatically create the Witness Directory. If the Witness server to be configured is not an Exchange 2010 server (having configured it manually), the global security group “Exchange Trusted Subsystem” must be added to the local administrators group on the witness server.
- The DAG creation wizard will finish, and we can verify that it was created successfully:
- Right-click the DAG object and go to Properties. Here we can verify that the Witness Server and Witness Directory were configured (in this case, the Exchange server in the organization without the Mailbox role and with the Hub Transport role was configured).
- Now, it is necessary to configure an IP Address for the DAG. Go to the IP Addresses tab. Then click Add.
- And assign it an IP within the DAG MAPI network.
- Now, we will use the Add-DatabaseAvailabilityGroupServer command to add 2 servers with the Mailbox role to DAG01.
- The EXC-SVR-01 and EXC-SVR-02 servers will be added to DAG01.
Adding database copies
Having created the DAG and added the EXC-SVR-01 and EXC-SVR-02 servers, we can begin to use it. To do so, we will add database copies to DB01 (mounted on the EXC-SVR-01 server) and DB02 (mounted on the EXC-SVR-02 server). What is a database copy? A DAG works in such a way that databases can be on 1 or more Mailbox servers (in this case, in DAG01), either active or passive. However, only one active copy of the databases can exist, so the other copies (on one or more servers in the DAG) become passive copies. This passive copy will be kept up to date through database replication, where logs will be copied and committed to the passive database, thus preventing data loss in the event of a failover or switchover. To create copies of a database within the DAG, we can use the EMC or the EMS. Below I will show you how to do it both ways:- We add a database copy through the EMC:
- Go to: Organization Configuration>Mailbox. Right-click the database for which we want to create a copy and start the Add Mailbox Database Copy… wizard.
- The wizard to add a database copy will start. Here we must choose the server where we will create the copy and the activation preference order (in this case, because we have only 2 copies, it will automatically be configured as second in activation preference).
- This will complete the wizard, adding the database copy.
- We verify that the DB01 database copy was added.
- Now we will add a copy of the DB02 database through EMS:
- We will use the Add-MailboxDatabaseCopy command:
- After this command is executed, we can verify that the DB02 database copy was created on the EXC-SVR-01 server:
Database switchover
We can perform a database switchover to its passive copies, causing the database to become active (mounted) in one of its copies. In this case, we will perform the switchover of the DB01 database:- Before doing so, it is necessary to verify that the ContentIndex status is Healthy in all copies. To verify this, we will run the Get-MailboxDatabaseCopyStatus * command.
- If the ContentIndex status appears as Failed in any of the copies, we can use this command to regenerate it:
- After verifying the ContentIndex status, we can perform the database switchover. In Organization Configuration>Mailbox, right-click the database we want to move and start the wizard to move the active database copy:
- The wizard will start, where we will first select the server to which we will move the active copy and select Lossless as the database mount dial settings:
- After this, the move will run and the wizard will finish:
- Finally, we verify that the database copy is active and mounted on the EXC-SVR-02 server:
Database failover: ServiceDown Simulation
Now we will simulate a Failover in the previously created “DAG01” DAG. What is a Failover? It is an operational Backup mode in which the functions of a system are assumed by a secondary system component when a primary component fails or becomes inaccessible. In the case of an Exchange 2010 DAG, a failover occurs when:- MAPI Network Down: A server is disconnected or experiences failures in the MAPI network connection (it cannot participate in DAG operations
- Node Down: a server cannot participate in DAG operations but remains enabled on the MAPI network.
- We will simulate the EXC-SVR-02 server outage by disabling the network adapter:
- After disabling the network adapter, we can check the Service Down progress on the EXC-SVR-02 node and the automatic mounting of the databases on the EXC-SVR-02 server through the Get-MailboxDatabaseCopyStatus * cmdlet (in a DAG with more active copies of the databases, database copies will be activated depending on activation preference).
- After this process, we can verify that the databases are mounted on the EXC-SVR-01 server (the only active DAG node) and that the status of the copies on the EXC-SVR-02 server is currently ServiceDown.
Thanks for reading. The learning continues in the next article.