How to Build Exchange 2019 from scratch: Configuring a DAG

Database Availability Group or DAG is the fundamental component and building block in Exchange Server for high availability and site resilience. You can have up to 16 Exchange Servers in a DAG that work with each other and provide automatic database-level recovery after an Exchange database (.edb), mailbox server, or network failure.

You can set up two different kinds of DAG for Exchange Server 2019,

  • DAG with Cluster Administrative Access Point or IP (static or DHCP)
  • DAG without Cluster Administrative Access Point or IP

However, the default DAG setup in Exchange Server 2019 is without cluster administrative access point or IP-less.

In this article, you will learn the steps to build and set up Exchange Server 2019 DAG without ‘cluster administrative access points’ from scratch.

Steps to Configure and Build Exchange Server 2019 DAG from Scratch

To configure and build Exchange Server 2019 DAG, you need to set up at least two different physical servers or VMs running the same Exchange Server 2019 version. Make sure both servers are configured correctly. Refer to this guide to learn about setting up Exchange Server 2019.

You also need a Witness Server, which is critical for maintaining quorum when servers are even in DAG. However, if you are setting up DAG with an odd number of members, you don’t need to set up a witness server. To learn more, refer to this Microsoft article.

Since we are setting up two Exchange Server 2019 in DAG, we will be setting up a witness server. The steps are as follow,

Step 1: Setup Witness Server

To configure and set up a File Witness Server (FSW), deploy a new file server machine or VM with Active Directory Role. Do not use your Domain Controller (DC) as a file server.

The steps are as follow,

  • Access the file server and open Active Directory Users and Computers.
  • Find and double-click on Administrators Group to open the properties.
  • Go to members and then click Add.
  • Then search and add Exchange Trusted Subsystem and click Apply> OK.

Next, we need to create DAG and then add member servers.

Step 2: Create Database Availability Group (DAG)

To create a Database Availability Group (DAG), you can use Exchange Admin Center (EAC) or Exchange Management Shell (EMS). The steps are as follow,

  • Log in to the Exchange Server and open Exchange Admin Center (EAC).
  • Go to servers> database availability groups and click +.
  • Enter the DAG name, Witness Server address, and Witness directory path in the respective fields. You may enter 255.255.255.0 or keep the IP address empty and click Save
  • The Database Availability Group will be created.

To create DAG using Exchange Management Shell (EMS), you can follow these steps,

  • Open EMS and then execute the following command
New-DatabaseAvailabilityGroup -Name "DAGNAME" -WitnessServer "WitnessServerNameOrAddress" -WitnessDirectory "PathcToWitnessServerDirectory"

"dagname" "witnessservernameoraddress" "pathctowitnessserverdirectory" "/pathctowitnessserverdirectory" "/witnessservernameoraddress" "/dagname"

For instance,

New-DatabaseAvailabilityGroup -Name DAG01 -WitnessServer FILEWITSRV01 -WitnessDirectory C:\DAG01
  • To check if DAG is created successfully, you can run the following command in EMS or login to EAC and navigate to servers> database availability groups.
Get-DatabaseAvailabilityGroup "dagname" | Format-List "/dagname" 

Step 3: Add Member Servers to DAG

Now that you have created DAG, it’s time to add the member Exchange Server 2019 into the DAG. The steps are as follow,

  • In Exchange Admin Center (EAC), navigate to servers> database availability groups and click on the Manage DAG membership
  • Then click on the + icon
  • Select the Exchange 2019 Servers you want to add to the DAG using the add-> button and then click OK.
  • Once added, click Save.
  • This will begin installing the Windows Failover Clustering in the selected member Exchange 2019 Servers. Once completed, the Exchange 2019 Servers will be added to the DAG.
  • Click Close. You will see the database availability group with witness server and member servers’ names in the Exchange Admin Center under servers> database availability groups.

Step 4: Add Database Copies

Finally, you can add the mailbox database copies to the member mailbox servers to enable continuous replication and ensure the database remains active even if a member server fails. The steps are as follow,

  • Open EAC and navigate to servers> databases.
  • Choose the database you want to add to member servers and click the(three dots) icon.
  • Choose Add database copy.
  • Click Browse, choose Exchange Server, and click OK.
  • Click Save. This will create the mailbox database and log files copies on the selected member server.
  • After the process completes, click Close.
  • To check if database copies are added to the member server, click the refresh icon under servers> databases.
  • The Servers with Copies column will display the Exchange 2019 servers (member servers) where database copies are added.

At this stage, you have successfully deployed and configured Exchange 2019 DAG from scratch.

  Case Study
bannerReviving PNG DataCo Ltd After an Exchange Server Crash - Uncover the Full Recovery Journey!

See how PNG DataCo Ltd used Stellar Repair for Exchange

Read Case Study

Conclusion

In this article, we shared simple steps to deploy and configure Exchange Server 2019 database availability groups from scratch. Although Exchange 2019 DAG provides site resilience and protection against database and server failure, it is not an alternative to backup. You still need to maintain regular VSS-based database backups to prevent permanent data loss when disaster strikes.

Besides, keeping an Exchange server recovery software, such as Stellar Repair for Exchange, is highly recommended. It comes in handy when you need to restore mailboxes from corrupt or damaged Exchange databases. It saves the mailboxes extracted from the repaired database to PST format and provides options to export them directly to Office 365 or another Live Exchange Server.



Was this article helpful?
About The Author
author image
Ravi Singh linkdin Icon

Senior Writer at Stellar®. He is an expert Tech Explainer.

Table of Contents

WHY STELLAR® IS GLOBAL LEADER

Why Choose Stellar?
  • 0M+

    Customers

  • 0+

    Years of Excellence

  • 0+

    R&D Engineers

  • 0+

    Countries

  • 0+

    PARTNERS

  • 0+

    Awards Received