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.

exchange-2016-dag-01

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.

exchange-2016-dag-install-01

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.

exchange-2016-dag-witness

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

29 comments

  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).

    Thanks,

    • 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:

    Hello,

    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?

    Thanks
    Alex

    • 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:

        Hi

        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 {{10.1.0.0/16,Up}}
        DAG01ReplicationDagNetwork01 True {{172.16.0.0/16,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

        Cheers

  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.

    Cheers

  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.

Leave a Reply

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