Home » Exchange Server » Installing an Exchange Server 2016 Database Availability Group

Installing an Exchange Server 2016 Database Availability Group

In this tutorial I will walk you through the installation of an Exchange Server 2016 database availability group. For this example a DAG with two members in the same site is being created, with a third Windows server in the same site being used as the file share witness.


To prepare for the new database availability group I’ve installed two Exchange 2016 servers with identical hardware, storage and performance specifications. When each server was installed, Exchange setup created a default mailbox database. I’ve already renamed the databases to unique names, and moved them to storage paths ready to replicate between the two DAG members.

I have also prepared the file share witness server by adding the Exchange Trusted Subsystem group to the local Administrators group of the server.


In this example I’m creating a database availability group with no cluster administrative access point (CAAP). The DAG has no IP address of its own, and no computer object in Active Directory. The main implication of this is that backup software that relies on the CAAP for backup operations won’t work. As this option of an IP-less DAG was first introduced in Exchange Server 2013 SP1/CU4, so by now any decent backup product should support this configuration. But you should always verify this with your backup vendor of choice. Also be aware that this is only supported for DAGs that are running on Windows Server 2012 R2 (or later).

To create the new DAG from the Exchange Management Shell we run New-DatabaseAvailabilityGroup, providing the name for the DAG and also specifying the name of the file share witness server. I’m also specifying the filesystem for the DAG because my Exchange 2016 servers are using ReFS for their data volumes.

The new DAG object has now been created, but it doesn’t have any members yet. Next we add our Exchange 2016 servers to the DAG.

Repeat the previous step for the other DAG members as well.

The DAG now has two members.

The DAG’s file share witness is the server that was specified at the time of creation, MGMT, and the default witness directory has been configured by Exchange.

On the witness server itself you can see the witness directory has been created and populated.


Now that the Exchange Server 2016 database availability group has been created we can proceed with adding database copies.

Paul is a Microsoft MVP for Office Servers and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul is a co-author of Office 365 for IT Pros and several other books, and is also a Pluralsight author.
Category: Exchange Server


  1. Taiwo Bada says:

    Absolutely brilliant!!!!…
    I have setup my LAB following all your steps and all looks fine to this point 🙂

  2. Raman says:

    Hello Paul,
    Thanks for the article.
    I am installing Exchange 2016 in Test lab. Since now all the Exchange 2016 servers have mailbox role as well is it possible that I could make one of the Exchange 2016 server as witness server? Or it would not let me do it? Since, there is no option to install only CAS role which could also server as witness server (as it was possible with Exchange 2013).


    • The Witness server does not need to be an Exchange server, it only needs to be a Windows server that can host a file share. In a test lab you can just use your domain controller. It’s supported to use a domain controller as the FSW, just not recommended in production.

  3. Mike says:

    Would be interested in seeing this same type of post for 2 sites with a single DAG and 4 members. I would also be interested in seeing where the Alternate Witness comes into play as I don’t fully understand it’s role.

  4. Oleg says:


    Great article! I just have one quick question. I’m getting ready to install Exchange 2016 in my production environment and I’m wondering if I would still need to create a separate network for DAG replication? I know that when Exchange 2010 was introduced Microsoft recommended creating a separate network for that and not replicating the data over the LAN. Is this still the case?

    • Microsoft’s “Preferred Architecture” documents for Exchange 2013 and 2016 recommend a single network for DAGs.

      There has never been a hard requirement for separate replication networks. It’s always been optional.

  5. Isaac Biju says:

    Good article and easy to follow !!

    In Exchange 2016, how can we configure IP for DAG.
    In Exchange 2016 we could not see any option to have DAG IP.

  6. Alex MacDonald says:

    Hi Paul

    Ive setup my DAG but when I view the DAG in ECP I get a message on the right hand side saying “Object reference not set to an instance of an object”. All it says is in there is “Witness Server”. My Witness Server seems all OK as i can see the log files in teh share have been created.

    I also want to ensure that the replciation traffic goes between my Ex2016 servers over a replication network I’ve created. As I can;t see what networks the DAG is uing in the ECP, how do I configure this? Do I use the “New-DatabaseAvailabilityGroupNetwork” command?


    • B. Wieczorek says:

      @Alex Try to use a Get-DatabaseAvailabilityGroupNetwork at first. Normally such a network should already exists and you need to enable / disable the replication via Set-DatabaseAvailabilityGroupNetwork. So no new network must be created.

      • Alex MacDonald says:


        I am still getting the “Object reference not set to an instance of an object” error message in the EAC information area on the right hand side when I view the Database Availability Group in EAC.

        I used the following command to ensure my mapi network does not handle any of the replication traffic,
        Set-DatabaseAvailabilityGroupNetwork -Identity DAG01MapiDagNetwork -ReplicationEnabled:$false

        All seems correct when I run,
        Get-DatabaseAvailabilityGroupNetwork DAG01

        I get,
        Identity ReplicationEnabled Subnets
        ——– —————— ——-
        DAG01MapiDagNetwork False {{,Up}}
        DAG01ReplicationDagNetwork01 True {{,Up}}

        Any ideas?

    • filip says:

      I have got the same ecp error on dag “Object reference not set to an instance of an object”.
      How did you fix It?

      • Alex MacDonald says:

        Fixed: The binding order of the adapters is important, make sure that the adapter used for MAPI traffic is at the top if you have configured a MAPI network and a separate REPL network,

        1. Go into the Network Connections window and you should see 2 NICs. One is the MAPI adapter and the other is the Replication adapter
        2. Press ALT and select Advanced>Advanced Settings
        3. Select the MAPI network adapter
        4. Press the UP arrow on the right hand side
        5. Restart ECP and now when you select the DAG it displays all the information about the DAG, Witness Server and DAG Network as it’s supposed too


  7. Nuno Rodrigues says:

    Hi i have already one exchange 2016 working. It´s possible to create a second one and the witness and create a DAG? the exchange already running is domain controller and DHCP server.

  8. Frindel says:

    Just install your exchange server and add it like member of the DAG with the command listed on top.
    PS] C:\>Add-DatabaseAvailabilityGroupServer -Identity EX2016DAG01 -MailboxServer EX2016SRVX

  9. Stefan Desira says:

    I have a new setup with two Exchange 2016 servers installed on Windows Server 2012 R2. I am looking to create a DAG with 2 members and 1 witness server.

    Can the witness server be a Windows Server 2008 R2 machine?

  10. nir cohen says:

    hi paul

    i need to implement a dag in my company …

    i have two exchange 2016 servers on 2012 r2 …

    i dont really understand the benefits of ip less dag …

    can you explain t for us ?

  11. grant says:

    I have this setup but I am noticing some strange things with the First server. Basically if i fail the first server at any point the second server does not automatically mount the db. The first server also spikes to 100% cpu usage and w3wp.exe goes into a crash loop on host1. I rebuilt the environment and it still continues. The first server only has the 1 db and i am wondering if i need some kind of generic placeholder DB for the first server so that it has some database to mount on boot when the second server has its db mounted?

    I have all of the virtual directories on each server mapped to the mail.domain.com/virtual directory and that host resolves to a load balancer that is monitoring both hosts. any suggestions on where the problem may lie? this is my first attempt at a dag.

      • grant says:

        Originally I had 1 db with all mailboxes in it (test env so only 1 user mailbox and all of the system mailboxes). I had copies of that on both dbs.

        I now have 3 total dbs, 1 for each server that contains the generic system accounts (no copies anywhere) and then a 3rd with my test user that has a copy on both servers. The behaivor is the same. With both servers up its fine. Once i fail the first server (or reboot it) i can never get it to come back up. When it comes back online it is at 100% cpu utilization and the various iis application pools take turns failing rapidly. The only way to recover is to remove the database copies and remove the dag, then the first server behaives.

  12. pavnesh kumar says:

    i also had same issue i have resolved the issue.

    i moved all the arbitation mailboxes to exchange 2016 from 2013 and also moved administrator account mailbox to exchange server 2016.
    issue stand resolved

  13. Dave says:

    I’m planning on upgrading from a single Exchange 2010 Server (on a Windows 2008R2 box) to two Windows 2016 Servers each running Exchange 2016 in a DAG as you describe in this article. Any advice or tips on the best way to accomplish this? My Exchange 2010 box has 4 DB’s and about 200Gb of data and will be decommissioned after the migration.


  14. Christopher Milligan says:

    Paul absolutely AWESOME set of tutorials and has helped me no end in deploying 2016 on prem. One issue I did hit with the DAG was I had to create the CNO for the new DAG in my AD and add in the server accounts into the securities of that Computer account.

    I’m pretty sure I must have missed a step somewhere as you don’t mention it.

    Thanks again for the priceless tutorials, they are life savers.

    Much Appreciated

    • If you’re creating a CNO that means you’re not creating an IP-less DAG, which is not the recommended approach (IP-less is recommended, and is the default for 2016). Yellow box in the article covers that point.

  15. Marc Simoneau says:

    Hi Paul, thanks for your time and effort in creating these tutorials. Greatly appreciated.

    Just wondering if there are specific steps on adding disks to a IP-less DAG? I have initialized and created partitions after the Dag was created with powershell because I have to complete mailbox migrations in a staged manner due to storage constraints. When I restart the server the newly added disk goes offline? The disks that were present when the DAG was created are online after the restart. I’ve also set the storage setting newdiskpolicy to OnlineAll but this hasn’t helped. Must I somehow tell the cluster to manage the new disks?

      • Marc Simoneau says:

        It’s SAN attached through VMware. It’s happening on two newly built Exchange 2016 CU 4 servers in two different VMware clusters. Quite odd. I can’t seem to find any documentation on adding storage to an already existing DAG, do you know of any? I’m left with recreating the DAG to see if the problem still exists.

        • There’s no special steps that I’m aware of. Storage is managed by the OS. The DAG doesn’t offline/online storage volumes. The DAG does some storage management for auto-reseed scenarios, but that doesn’t involve keeping storage offline. I think you’ve got an underlying OS/VM issue.

  16. Tim Jahr says:

    Is it possible for an Exchange server to be a member of more than 1 DAG? We only have 2 Exchange servers (plus a separate FSW server) – so does that mean I can only have 1 DAG? We had considered separates ones for employee, staff, misc – but maybe there’s no benefit to that if they’re just replicating to the same 2 places?

  17. Robatwork says:

    Super article.

    As a newcomer to Exchange can i just thank you for all your articles which have proved very useful. If I may I would like to ask a pretty basic question. Is DAG the best (and recommended) method of having a hot/warm spare for Exchange?

    I am running a server for just 30-40 users but we do rely on email a lot so can’t afford too much downtime. I do backup but want something I can get back online within an hour if it goes pop.


  18. Kyle says:


    As always, great articles.

    I have a situation that you might be able to offer guidance on. I have setup a new E16CU5 lab environment (done this a couple of times to iron out my settings) and I created a new DAG through the ECP. When I add members it reports back as failed. I then reboot the potential DAG members and they finish installing part of the failover clustering components. Once rebooted, I can successfully add those members to the DAG without issue.

    Did I miss something in the pre-reqs regarding the failover clustering or is this expected behavior?


    • Adding a DAG member automatically installs and configures failover clustering. I’ve occasionally seen the same behavior but it hasn’t stopped me from adding the DAG member on a second attempt. There might have been some other issue like a pending restart. If it works fine after a reboot, then perhaps the only lesson to take from it is that a reboot before you add the DAG member might be a good idea.

Leave a Reply

Your email address will not be published. Required fields are marked *