---
title: "Setting Up Exchange Database Availability Groups Correctly"
description: "Learn how to set up Exchange database availability groups with Exchange Admin Center and PowerShell in this step-by-step guide."
canonical: "https://adamtheautomator.com/exchange-database-availability-group/"
---

# Setting Up Exchange Database Availability Groups Correctly

> Learn how to set up Exchange database availability groups with Exchange Admin Center and PowerShell in this step-by-step guide.

Source: https://adamtheautomator.com/exchange-database-availability-group/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Setting Up Exchange Database Availability Groups Correctly](https://adamtheautomator.com/wp-content/uploads/2021/01/How-to-Set-Up-Exchange-2019-Database-Availability-Groups.jpg)

# Setting Up Exchange Database Availability Groups Correctly

[![](https://secure.gravatar.com/avatar/5cd71a4e2894e3d2608b9e07347e05b85fa86e0955eb3f708412e6b9da7fd920?s=192&d=mm&r=g)Faris Malaeb](https://adamtheautomator.com/author/faris/)14 January 20217 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[Microsoft Exchange](/tag/microsoft-exchange/)

Table of Contents

*   [Prerequisites](#h-prerequisites)
*   [Configuring the Witness Server](#h-configuring-the-witness-server)
*   [Configuring a Database Availability Group with Exchange Admin Center](#h-configuring-a-database-availability-group-with-exchange-admin-center)
*   [Adding a Member Server to the Database Availability Group](#h-adding-a-member-server-to-the-database-availability-group)
*   [Adding a Mailbox Database](#h-adding-a-mailbox-database)
*   [Configuring a Database Availability Group with PowerShell](#h-configuring-a-database-availability-group-with-powershell)
*   [Troubleshooting](#h-troubleshooting)
*   [IPv6 is Enabled…](#h-ipv6-is-enabled)
*   [CreateCluster() failed with 0x5. Error: Access is denied](#h-createcluster-failed-with-0x5-error-access-is-denied)
*   [Next Steps](#h-next-steps)

If you have a highly-available Microsoft [Exchange](https://adamtheautomator.com/exchange-distribution-group/) environment, you have Exchange database availability groups. Database availability groups are the key to maintaining a highly-available and scalable set of [_Mailbox servers._](https://docs.microsoft.com/en-us/exchange/architecture/mailbox-servers/mailbox-servers?view=exchserver-2019)

In this tutorial, you will learn how to create and set up Exchange Database Availability Groups 2019 with the web interface _and_ with PowerShell. You’ll also learn how to add member servers and join a database to the group.

![Database Availability Groups, overview](https://adamtheautomator.com/wp-content/uploads/2021/01/1-1.png)

Database Availability Groups, overview

## Prerequisites

This tutorial will be hands-on and will require an existing environment to follow along. To ensure your environment matches the tutorial, ensure that:

*   Two servers are running Exchange Server 2019.
*   All Exchange servers are running the same version of Microsoft Exchange. Mixing versions is not supported. This tutorial will use two servers running on Windows Server 2019 Standard Edition and Exchange Server 2019 called _Ex01_ and _Ex02_.
*   A Windows Server 2016+ that will act as the [_Witness Server_](https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/clustering-what-exactly-is-a-file-share-witness-and-when-should/ba-p/255637). This tutorial will be assigning a server called _FS01_ as the witness server.

> _If you have an odd number of Exchange nodes you will not need a witness server. The cluster will be using [Node majority](https://techcommunity.microsoft.com/t5/failover-clustering/understanding-quorum-in-a-failover-cluster/ba-p/371678)._

*   All servers must be joined to an Active Directory (AD) domain.
*   The user should be at least a member of the **Organization Management** and **Database Availability Group Role.** _[A complete reference on the required permission on Microsoft.com](https://docs.microsoft.com/en-us/exchange/permissions/feature-permissions/ha-permissions?view=exchserver-2019)_

## **Configuring the Witness Server**

Before you can create Exchange Database Availability Groups with an even number of nodes, you first need a witness server. The witness server hosts a folder that all members of the Exchange Trusted Subsystem AD Universal group access. The witness server is used to achieve the voting majority and maintain the quorum.

> _You can read more about witness servers and how they work within availability groups in [Microsoft’s documentation](https://docs.microsoft.com/en-us/exchange/high-availability/manage-ha/manage-dags?view=exchserver-2019#dag-witness-server-and-witness-directory)._

While on the FS01 server:

First, add the _Exchange Trusted Subsystem_ AD group to the local _Administrators_ group. The _Exchange Trusted Subsystem_ AD group is a high-privilege AD Group that has full access to all Exchange related objects

![](https://adamtheautomator.com/wp-content/uploads/2021/01/Picture4-1.png)

Adding the Exchange Trusted SubSystem to the Local Administrators group.

Then, create a new folder and name it something relevant such as _C:\\DAGWitness_.

That’s it for the configuration on the witness server.

## Configuring a Database Availability Group with Exchange Admin Center

Let’s now get down to actually creating a Exchange database availability groups!

1.  Open up The Exchange Admin Center on EX01 by going to _https:///EX01/**ecp**_. EX01 is one of the mailbox server’s that the tutorial is using.

2\. Once in the Exchange Admin Center, click on **servers —> database availability groups** as shown below.

![Database Availability Groups](https://adamtheautomator.com/wp-content/uploads/2021/01/Picture5-1.png)

Database Availability Groups

3\. Click on the **+** sign and you will see the following dialog. Ensure you fill in each of the below required fields.

*   **Exchange Database Availability Groups name –** This is the name for the group. It will be the name used to manage and communicate with the DAG.

> _The group name cannot exceed 15 characters._

*   **Witness server –** The name of the server hosting the witness folder. In this tutorial’s case, the server is _FS01_.
*   **Witness directory –** The path literal path to for the directory created.

> _Always use the local path and not a UNC path for the **Witness directory**._

*   **Exchange Database Availability Groups IP addresses –** The IP address which will be assigned to the DAG.

![Exchange Database Availability Groups](https://adamtheautomator.com/wp-content/uploads/2021/01/Picture6-1.png)

Exchange Database Availability Groups : DAG required parameters

4\. Once you’ve filled in all of the required fields, click on **Save** to create the group.

> _If you run into any problems at this stage, be sure to refer to the Troubleshooting section below._

### Adding a Member Server to the Database Availability Group

Exchange Database Availability Groups are created but it’s not doing much good until you add some nodes (member servers) to it. To do that, while still in the Exchange Admin Center:

1.  Click on the newly created group and click the **Manage DAG membership** icon as shown below.

![Adding members to the DAG](https://adamtheautomator.com/wp-content/uploads/2021/01/Picture7-1.png)

Adding members to the DAG

2\. Next, add the member servers needed. For this tutorial, add **EX01** and **EX02** and click **Save.**

When you’ve added the member servers, a wizard will proceed in installing and configuring the Windows Failover Cluster on the nodes.

![Adding members to the DAG progress](https://adamtheautomator.com/wp-content/uploads/2021/01/Picture8-1.png)

Adding members to the DAG progress

> _Building the cluster can take some time, so feel free and get a cup of coffee._

If everything worked, you should now see the member servers assigned to the group as shown below.

![Servers are added to the DAG as members](https://adamtheautomator.com/wp-content/uploads/2021/01/Picture10-1.png)

Servers are added to the DAG as members

The database availability group is now ready. At this time, you can add mailbox databases to the group.

### Adding a Mailbox Database

Once you have the group created and the member servers added, it’s time to add a mailbox database. While still in Exchange Admin Center:

1.  Navigate to **servers —> databases.**

2\. Click on the database that you would like to join to the DAG and click on **Add database copy.** This tutorial has two mailboxes databases called EX01-DB and EX02-DB. A popup will ask you to specify the mailbox server that will host an additional copy of the selected mailbox database.

![Adding Database to DAG](https://adamtheautomator.com/wp-content/uploads/2021/01/Untitled-2021-01-07T104751.906.png)

Adding Database to DAG

3\. Click on Browse and select the desired server from the list and click on OK —> Save

![Selecting the additional server which will host a copy of the mailbox database ](https://adamtheautomator.com/wp-content/uploads/2021/01/Untitled-2021-01-07T104951.762.png)

Selecting the additional server which will host a copy of the mailbox database

The seeding process will be triggered and start copying the database to the destination selected server.

> _The process of initially adding a mailbox to the group is called seeding. Seeding is the process of copying the database from one server to another. The Seeding operation is a server resource-intensive, so plan it on non-busy days_

![](https://adamtheautomator.com/wp-content/uploads/2021/01/Untitled-2021-01-07T105056.141.png)

Seeding process

4\. Now confirm that this database is now hosted on **EX01** and **EX02 by** clicking on the **databases** tab. Notice below that the database below is now on **SERVERS WITH COPIES.**

You will also notice the **ACTIVE ON SERVER**. For this tutorial, the database EX01-DB is currently activated and mounted on the _EX01_ server.

![EX01-DB is now hosted on both EX01 and EX02](https://adamtheautomator.com/wp-content/uploads/2021/01/Untitled-2021-01-07T105132.478.png)

EX01-DB is now hosted on both EX01 and EX02

> _Its recommended to have the volume formatted using GPT not MBR as it can extend beyond Two TB, but if you stuck with this limitation and want to convert it to GPT without losing data, a conversion from MBR to GPT is possible third-party tools, [Read more about GPTGen at PowershellCenter.com](https://www.powershellcenter.com/2020/09/05/convert-to-gpt-from-mbr-without-losing-any-data-work-on-exchange-dag/)._

## Configuring a Database Availability Group with PowerShell

As an alternative method (and to save some time), you can also perform all of the aforementioned steps to create and configure a database availability group with PowerShell! Let’s see how.

While logged onto any Exchange Server:

1.  Open the [_Exchange Management Shell_](https://docs.microsoft.com/en-us/powershell/exchange/open-the-exchange-management-shell?view=exchange-ps) and the following command. This command creates a database availability group:

*   With the name of _DAG._
*   Using a witness server called _FS01._
*   Using a pre-created folder called _C:\\DAGWitness_ on the witness server.
*   Assigning the DAG 192.168.100.10 as an IP Address.

```powershell
New-DatabaseAvailabilityGroup -Name DAG -WitnessServer FS01 -WitnessDirectory C:\DAGWitness -DatabaseAvailabilityGroupIPAddresses '192.168.100.10’
```

Once complete, you should see the following output.

![Creating DAG using Powershell ](https://adamtheautomator.com/wp-content/uploads/2021/01/Picture11-1.png)

Creating DAG using Powershell

> _If you run into any problems at this stage, be sure to refer to the Troubleshooting section below._

2\. Next, use the `Add-DatabaseAvailabilityGroupServer` cmdlet to add the member servers to the Exchange database availability groups. Below is an example you can use to find all Exchange servers using `Get-ExchangeServer` and add them all to the database availability group called _DAG_.

```powershell
Get-ExchangeServer | Add-DatabaseAvailabilityGroupServer -Identity DAG 
```

Alternatively, you could add each member server one at a time using the `MailboxServer` parameter as shown below.

```powershell
Add-DatabaseAvailabilityGroupServer -Identity DAG –MailboxServer EX01
```

Now verify the member servers have been added using the `Get-DatabaseAvailabiltyGroup` cmdlet. If all is well, you should see all member servers in the `Member Servers` column as shown below.

![Members of the DAG](https://adamtheautomator.com/wp-content/uploads/2021/01/Picture12-1.png)

Members of the DAG

4\. Next, add the mailbox database to the database availability group using the `Add-MailboxDatabaseCopy` cmdlet. The below command adds the EX01-DB database that’s hosted on EX01 to EX02 to allow EX02 to hope an additional copy of the database.

`Add-MailboxDatabaseCopy -Identity EX01-DB -MailboxServer EX02`

5\. Restart the _Microsoft Exchange Information Store_ \*\*\*\*service on the destination server.

Finally, run the `Get-MailboxDatabaseCopyStatus` command to confirm the mailbox was added successfully. If all goes well, you should see an output like below.

![The Database is added ](https://adamtheautomator.com/wp-content/uploads/2021/01/Picture13-2.png)

The Database is added

> _Notice that one database is **Mounted** and the other is **Healthy.** The Mounted database is the copy serving the users and the Healthy database is the standby copy., Exchange can activate the standby copy should the Mounted copy run into problems._

## Troubleshooting

During the database availability group configuration, you may run into a few different problems. If so, refer to the following common troubleshooting steps.

> _Always check Windows Event log first as it have more information about the root cause and why things are not working as should._

### IPv6 is Enabled…

The error _Windows Failover Clustering isn’t installed on…_ is one of the common error messages you will see.

```powershell
A server-side database availability group administrative operation failed. Error The operation failed. 
CreateCluster errors may result from incorrectly configured static addresses. 
Error: Windows Failover Clustering isn't installed on 'EX01'’.
```

If you encounter this problem, disable IPv6 by creating a new 32-bit DWORD registry value called _DisabledComponents_ under _HKEY\_LOCAL\_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters and give it the value of_ **ffffffff**. Once complete, restart the server.

### CreateCluster() failed with 0x5. Error: Access is denied

You might encounter another common problem that’s caused by a permission problem.

```powershell
A server-side database availability group administrative operation failed. Error The operation failed. CreateCluster
errors may result from incorrectly configured static addresses. Error: An error occurred while attempting a cluster
operation. Error: Cluster API failed: "CreateCluster() failed with 0x5. Error: Access is denied". [Server:EX01.test.local]
```

To fix this problem, disable the database availability group AD computer object and make sure the _Exchange Trusted Subsystem_ AD group is granted Full Control of the AD object as shown below.

![](https://adamtheautomator.com/wp-content/uploads/2021/01/Picture9-1.png)

Adding Exchange Trusted SubSystem group

## Next Steps

Take a look at how to get Mailbox Database and perform some action, such as Move, Mount, and repair it using _[Get-MailboxDatabase and Other Cmdlet](https://adamtheautomator.com/get-mailboxdatabase/#Fixing_Corrupted_Mailboxes_with_NewMailboxRepairRequest)._

Also, import PST to Outlook in multiple ways on [_How to Import a PST into Outlook_](https://adamtheautomator.com/import-pst-to-outlook/)

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fexchange-database-availability-group%2F&text=Setting%20Up%20Exchange%20Database%20Availability%20Groups%20Correctly)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fexchange-database-availability-group%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fexchange-database-availability-group%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2021/04/Exchange-Distribution-Groups_-Your-How-To-Ultimate-Guide.jpg)

### [Exchange Distribution Groups: Your How-To Ultimate Guide](/exchange-distribution-group/)

Need to work with Exchange distribution groups? Learn the ins and outs of how to manage them with the Exchange Admin Center and PowerShell.

![](https://adamtheautomator.com/wp-content/uploads/2021/02/How-to-Move-Exchange-Mailboxes-with-PowerShell.png)

### [Move Exchange Mailboxes with new-moverequest Command](/new-moverequest/)

Learn how to move mailboxes the right way using PowerShell and the New-MoveRequest cmdlet.

![](https://adamtheautomator.com/wp-content/uploads/2021/02/How-to-Move-Exchange-Mailboxes-with-Exchange-Admin-Center-Moving-user-mailboxes-is-a-common-1.jpg)

### [Easily Move Mailbox with Exchange Admin Center](/move-mailbox/)

Learn how to move a mailbox in Exchange 2013, 2016 and 2019 in this informative walkthrough tutorial.

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
