How to Create DAG Exchange Server Step by Step?
So you are here to learn about how to create DAG in Exchange Server step by step. Don’t worry, it is a rather simple process. Moreover, once you set it up, you make your server more reliable and always available.
However, you can’t go on and establish a Database Availability Group just like that. You need to fulfill a set of criteria, all of which are explained below.
What to Do Before You Create a DAG in Exchange Server Step by Step?
- 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 Exchange Server Step by Step has these permissions or not, do the following.
- On the EAC:
- 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.
- Using EMS:
- 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: Steps for Exchange 2016 to 2019 Migration Explained.
The Organization Management role is the container for the “DAG” role as well, so no need to add it explicitly.
Want to Configure DAG? PreStage and 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 we will use for the DAG) > hit OK.
- Step 5. Right-click this time on the new computer object > select Disable Account > Press Yes (To confirm) > Then, OK.
Note, you can avoid CNO pre-staging activity in Windows Server 2012 R2 if you have a DAG that has no admin access point connections to the Mailbox servers.
Part Two: CNO Permission Assignment
- Step 1. Reopen ADUC
- Step 2. Click View and turn on Advanced Features.
- Step 3. Right-click on the computer object > Properties.
- Step 4. On the Computer Properties, switch to the Security tab > Add
You have two options
- Step 5.1. First is to Add the Exchange Trusted Subsystem
- Step 5.1.1. In the “Enter the object names to select” field, put Exchange Trusted Subsystem >
- Step 5.1.2. Click OK >
- Step 5.1.3. Select the Exchange Trusted Subsystem USG >
- Step 5.1.4. Go to the Permission field >
- Step 5.1.5. Under Allow, select Full Control >
- Step 5.1.6. Click OK.
- Step 5.2. The second option is to add the computer account for the first node to be added to the DAG
- Step 5.2.1. Click Object Types. >
- Step 5.2.2. Clear the Built-in security principals, Groups, and Users checkboxes. >
- Step 5.2.3. Select Computers. >
- Step 5.2.4. Hit OK. >
- Step 5.2.5. Put the name of the first Mailbox server to be added to the DAG in the “Enter the object names to select” field. >
- Step 5.2.6. Click OK >
- Step 5.2.7. Pick the first node’s computer account >
- Step 5.2.8. Go to the Permission field for <NodeName> >
- Step 5.2.9. Under Allow, select Full Control >
- Step 5.2.10. Click OK.
Part Three: Verify
- Step 1. Open ADUC.
- Step 2. Expand the Forest Folder
- Step 3. View the OU, and check if the account is listed or not.
Open the OU in which you created the account, and then verify that the account is listed.
Now that the preparation Steps are done, we can move on to the actual configuration part.
Create DAG 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 host name 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 n IP-less cluster administrative access point. Which is to use 255.255.255.255 as the field value.
Step 7. Finally, click Save.
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 of 2025. So, if you want your transition to the next chapter of local Exchange Server to go smoothly, you must become ready for the Exchange Server Subscription edition. One important step was to deploy DGS, which we have already done.
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
So in this in-depth tutorial on how to create a DAG in Exchange Server step by step. We 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.