Read time 4 minutes

Summary: Microsoft Exchange’s Database Availability Group (DAG) stores multiple mailbox servers and ensures automatic database recovery during server or network failure. Exchange databases running on DAG, when experiencing member server failures, automatically swap with a healthy member server. However, recovering the failed member server is vital to avoid unexpected server downtime or hiccups. Let’s learn how to recover a DAG member server and how Kernel for Exchange Server helps restore the Exchange database from a failed Exchange Server.

The latest versions of Exchange rely heavily on Database Availability Group (DAG) to ensure high data availability. They are designed to save Exchange Server and databases from any potential server failure or database corruption.

A DAG can have multiple servers as its members provided, they all have the same Exchange Server versions (it means there can never be two different versions of Exchange server in the same DAG). It can consist of up to 16 Exchange Servers, which can host multiple databases. The Database Availability Group prevents a server, which is a member of the group, from any potential catastrophe.

However, if for some reason you experience a server failure, you must immediately recover it. Moving further in this blog, we will learn how to recover a DAG member server and restore access to all your user mailboxes.

How to Recover a DAG Server After Failure?

When an Exchange Server is a member of DAG, you can quickly recover it if it fails or gets lost. This is done using the switch m:/RecoverServer which accesses the server setup in the Active Directory. After recovering the configuration settings of the server, the switch reloads the files and services on the server. It also applies the roles and settings that were loaded from the Server in the Active Directory.

To make any modification in DAGs (to add, remove, or change settings), you must have adequate permissions. These permissions allow you to add, remove, and configure database settings.

Here is a table depicting permissions required for the Database Availability Group:

DAG Permissions

Features Permissions Required
Database availability group membership Organization Management

Database Availability Groups

Database availability group properties Organization Management

Database Availability Groups

Database availability groups Organization Management

Database Availability Groups

Database availability networks Organization Management

Database Availability Groups

Prerequisites of Restoring a Database in DAG

For a 100% recovery of DAG member server, you must take care of the following points:

  1. Take a backup of your EDB file using an EDB to PST converter tool and save all your mailboxes to a safe location.
  2. Ensure the user account has all the permissions before starting the recovery procedure.
  3. You should know the exact location of the Exchange database because the switch requires access to that location to recreate the files and settings. You must use the /TargetDir switch to mention the location. Even if you do not use the /TargetDir switch, the recovery operation will install the files at the default database location, which is – Program Files\Microsoft\Exchange Server\V15.
  4. You can manually set the saving location for the database with the help of the following steps –
    1. Start either MSC or LDP.EXE.
    2. Go to the location:

      CN=ExServerName, CN=Servers, CN=First Administrative Group, CN=Administrative Groups, CN=ExOrg Name, CN=Microsoft Exchange, CN=Services, CN=Configuration, DC=DomainName, CN=Com

  5. Go to the Exchange Server object, right-click on it, and click the Properties.
  6. Search the msExchInstallPath as it stores the current Exchange database location. You can use this location while recovering the database files.
  7. Check the current state of the Exchange environment using the following steps:
    1. Sign in to the Exchange admin center using admin credentials and go to servers and databases. You’ll notice Bad Copy Count and that database copies are down there.
    2. Click servers, then database availability groups.
    3. Select the DAG list member and then tap on the Edit icon.
    4. This will show that the selected DAG member is not operational.

So, after learning about the state, we see the issue, so let’s move on to the recovery process.

Recover DAG Member Server

For the recovery, we will use the /m:RecoverServer switch. Before using the RecoverServer switch, you need to perform the following Exchange commands in the Exchange Management Shell:

  1. Run the command:

    Get-MailboxDatabase DatabaseName | Format-List *lag*

    The command will retrieve the truncation or replay log of the database copies.

  2. Run the command:

    Remove-MailboxDatabaseCopy DatabaseName\MailboxServerName

    The command will delete any database mailbox copy on the server.

  3. Run the command:

    Remove-DatabaseAvailabilityGroupServer -Identity DAGname -MailboxServer MailboxServerName

    The command will delete the mailbox server files and settings from the respective availability group.

  4. Reset the computer account in the Active Directory.
    1. Follow Control Panel>>Administrative Tools>>Active Directory Users and Computers.
    2. Then Click Computers.
    3. After selecting the Computers, right-click it and click Reset Account.
  5. After resetting the computer, open the command prompt and input the command

    Setup /m:RecoverServer

  6. As soon as the Exchange Server recovery is complete, run the following command

    Add-DatabaseAvailabilityGroupServer -Identity DAGname -MailboxServer MailboxServername

    The command will add the Exchange server to the availability group.

  7. Add the Exchange database copy to the server

    Add-MailboxDatabaseCopy -Identity DatabaseName -MailboxServer MailboxServerName

After completing the process, you can start working on the Exchange Server and access the data in the database.

How to Repair a Corrupt Exchange Database?

In addition to the mishandling of server and malware attacks, damage to the EDB file is one of the major reasons for the server failure. To recover the database suffering from corruption, you must first repair EDB files and then perform the server recovery.

You can cure the corruption with the free ESEUTIL tool. However, for guaranteed results and data safety, you must use professional Exchange data recovery tools like Kernel for Exchange Server. This tool can cure any form of corruption in the Exchange and recover your complete mailbox without data loss.

Conclusion

In this blog, we discussed the steps to recover DAG member server after failure. Even though it is quite a simple and direct method of recovering the server, it may not work well for severely affected data. So, there is no certainty of data recovery. To get an assurance of advance Exchange recovery software, you should use Kernel for Exchange Server. It reads the Exchange database file directly and allows you to quickly recover complete data, including the deleted mailbox data.

Kernel for Exchange Server
Related Posts