Table of Contents
What is DAG in Exchange Server?
A set of 16 Exchange mailbox servers makes the Database Availability Group, aka DAG. It automatically provides database-level recovery from failure and outage, and makes the Exchange Server highly available and resilient. It works by replicating the mailbox databases across multiple servers within the group. However, you cannot simply establish a Database Availability Group. You need to fulfill a set of criteria, all of which are explained below.Things to Do Before You Create DAG in Exchange Server
- A minimum of two servers is required for DAG to work. So, if you have only one server, add another.
- When you add the new server, make sure that it runs the same exact Exchange Server version. A version mismatch will prevent you from creating a DAG in Exchange Server.
- Both DAGs should be on the same AD but have different names and IP addresses.
- Always ensure that mailbox copies made by DAGs stay on different physical disks. So if any damage happens, restoration can be done.
- Also, you must always specify a witness server and witness directory.
- To make new Database Availability Groups, you need to have the following permissions
- Organization Management
- Database Availability Groups
- To check whether you or the person who is supposed to create DAG in Exchange Server step by step has these permissions or not, do the following.
- Step 1. Log in to EAC > Permissions > Admin Roles
- Step 2. Select “Organization Management” and hit Edit
- Step 3. Under “Members,” click Add (+)
- Step 4. Pick the member > Add > OK > Save.
- Step 1. Open a new instance of Exchange Management Shell
- Step 2. Type (After replacing placeholders):
Add-RoleGroupMember "Organization Management" -Member "<account name>"
- Step 3. Verify:
Get-RoleGroup "Organization Management" | select members
Also Read: How to Migrate Exchange 2016 to 2019?The Organization Management role is the container for the “DAG” role as well, so no need to add it explicitly.
How to Configure DAG in Exchange Server Step By Step?
There is a set of steps that you need to follow to create DAG in Exchange Server. Let’s separate them into parts: Part 1. PreStage and Part 2. Assign Permissions to the CNO Part One: CNO Pre-staging- Step 1. Launch ADUC.
- Step 2. Toggle forest node.
- Step 3. Right-click on the OU > New > Computer
- Step 4. Enter the name (this is the same name I will use for the DAG) > hit OK.
- Step 5. Right-click the new computer object > select Disable Account > Press Yes (To confirm) > Then, OK.
- Step 1. Reopen ADUC
- Step 2. Click View and turn on Advanced Features.
- Step 3. Right-click on the computer object > Properties.
- Step 4. In Computer Properties, switch to the Security tab > Add.
- In the “Enter the object names to select” field, put Exchange Trusted Subsystem > Click OK.
- Select the Exchange Trusted Subsystem security group > Go to the Permission field.
- Under Allow, select Full Control > Click OK.
- Click Object Types > Clear the Built-in security principals, Groups, and Users checkboxes.
- Select Computers. >Hit OK.
- Put the name of the first mailbox server to be added to the DAG in the “Enter the object names to select” field. >
- Click OK >
- Pick the first node’s computer account > Go to the Permission field for <NodeName>
- Under Allow, select Full Control > Click OK.
- Step 1. Open ADUC.
- Step 2. Expand the Forest Folder
- Step 3. View the OU, and check if the account is listed or not.
How to Create DAG in Exchange Server Step By Step Via ECP (Exchange Control Panel)
Here is the list of steps simplified:- Step 1. Open EAC > Servers tab > Select Database Availability Groups.
- Step 2. Click + Add.
- Step 3. A new Database Availability Group page opens on your screen. Type in the name (keep it within 15 characters). Don’t put a new name instead; use the same one you used during the formation of CNO.
- Step 4. Specify a witness server for this DAG. Note that this should be either a hostname or a fully qualified domain name (FQDN). No Wildcard characters or IP addresses are allowed.
- Step 5. Then, put a path to the Witness Directory. Tip: You can leave it blank if you want to. Exchange Server creates it for you; this is the default path (%SystemDrive%\DAGFileShareWitnesses<DAG FQDN>).
- However, if you want it to be different/custom, you must fill in the value before proceeding.
- Step 6.1. In the Database Availability Group, the IP addresses field is where you put all the static IPv4 values of this server. Once you do push the Add button.
- Step 6.2. However, you don’t always have to put static IPs; keep it blank if you plan to use Dynamic Host Configuration Protocol (DHCP).
- Step 6.3. There is also a third option available only for those who plan to use an IP-less cluster administrative access point. Which is to use 255.255.255.255 as the field value.
- Step 7. Finally, click Save to create DAG in Exchange Server.
Use PowerShell Cmdlets to Configure Database Availability Groups
Here is how to use the code-based method:- Step 1. Open a new EMS (Exchange Management Shell) instance.
- Step 2. Then, type:
- New-DatabaseAvailabilityGroup -Name DAG0 -WitnessServer FILESRV0 -WitnessDirectory C:\DAG0
- Step 3. To verify that you’ve successfully created a DAG, run the following command:
Get-DatabaseAvailabilityGroup <YourDAGName> | Format-List
Additional Tips to Keep Your Exchange Server Secure
It is already a well-known fact that both Exchange Server 2016 and 2019 will expire in October 2025. So, if you want your transition to the next chapter of the local Exchange Server to go smoothly, you must become ready for the Exchange Server Subscription edition. One important step was to deploy DAGs, which I have already done.Also Read: How to Decommission An Exchange 2007 Server? Complete Solution
Now, what if some external factor out of your control causes the .edb file to go corrupt? What to do in such a scenario? It is exactly for such emergencies that we have developed the SysTools Exchange Server Recovery Software. Download a copy today and activate it for repairing the Exchange Server Database files.Conclusion
In this in-depth tutorial, on how to create DAG in Exchange Server step by step. I have explained not one but two different methods of configuring a Database Availability Group. One used the traditional Exchange Control Panel, and the second one involved the use of PowerShell cmdlets. Choose any way you think is more comfortable. However, be sure to complete all the prerequisite steps, which have also been explained in this tutorial.Frequently Asked Questions
A Database Availability Group (DAG) is a group of up to 16 Exchange mailbox servers. A DAG replicates mailbox databases across the servers, gives database level recovery from failure and outage, and keeps Exchange Server highly available.
You need at least two servers with the same Exchange Server version. The servers must sit in the same AD, and mailbox copies must stay on different physical disks. You must also specify a witness server and a witness directory.
You need the Organization Management and Database Availability Groups permissions.
Open a new Exchange Management Shell (EMS) instance and type the New-DatabaseAvailabilityGroup cmdlet with the DAG name, the witness server and the witness directory. For example, New-DatabaseAvailabilityGroup -Name DAG0 -WitnessServer FILESRV0 -WitnessDirectory C:\DAG0.