Exchange Server | Murat Bilici

"Empower your knowledge"

Exchange 2010 DAG implementation & Configuration

This document outlines the installation and configuration of the Database Availability Group on the mailbox server role. All this will take the installation and configuration to a total of minimum 2 servers in the overall DAG cluster. DAG is a new concept to the exchange application clustering on the database level. The new concept of the Database Availability Group (DAG) is exciting Exchange 2010 technology to bring low cost high availability without costly hardware SAN infrastructure. DAG takes less than 30 seconds in a failover. DAG can be expanded to multiple datacenters and up to 16 database copies.


This document assumes that:

Windows Server 2008 Enterprise x64 Edition is installed per baseline regulations which include the latest approved service pack and hotfixes.

Exchange 2010 Mailbox role servers are already installed on the same AD site.

2 NIC’s are configured per server one for replication of logs and other for production MAPI connectivity. The networks will be called Replication and MAPI in the document.

File Share Witness creation

File share witness guides the Hub Transport server which server has active database and ready to receive the emails. We need to create a folder on any one of the CAS/HT server.

  1. Login to one of the HT/CAS server
  2. Create a folder like C:\FSW_DAG1
  3. Add “Exchange Trusted Subsystem group” in the local Administrators group.

Database Availability Group Creation

We can create DAG from Exchange management console and shell. We will do some part by the console rest by shell.

1. Open EMC -> Expand Organization components and select the database availability group tab

2. Right click and select New Database Availability Group

3.  We are now ask to fill in 3 pieces of information for our DAG

  1. DAG Name(This will be the name of the cluster): something like


  1. Witness Server: This is the server where we have created the FSW. Type the FQDN here of the server. Like

  2. Witness Directory: This is the FSW directory path which will be something like


  3. Click next, new and Finish on the completion page
  4. We have created our DAG.
  5. we can verify in EMC that our DAG was created as well

by itself the DAG does not do anything for us and there are no properties to manage in EMC, however if we use the shell we can see a few additional properties like:

NetworkCompression                     : InterSubnetOnly NetworkEncryption                          : InterSubnetOnly

The cmd will Get-DatabaseAvailabilityGroup | fl

  1. Go to the properties of the DAG and select IP address tab
  2. Give 1 IP address if both the nodes in the same subnet else give 2 IP addresses. Click ok and ok. IP has to be of the mapi network.

Manage Database Availability Group Membership

  1. In EMC right click our DAG and select manage database availability group

  1. On the manage database availability group page click the Add button

  1. In the select mailbox server window select the both mailbox servers
  2. Click ok then manage. In the screen there is only one server but we have to add 2 servers.

Selecting manage installs Windows clustering so it will take long time to finish

  1. Click finish on the completion page

  1. We can now see that both servers are added to the DAG. Something like below screen

  1. Open active directory users and computersà go to computer OU. You will find computer object has created with the DAG name we supplied. This object will be used by windows clustering. Also check if the dns host record has created. It should be created automatically.
  2. Open cluster admin then we will see the Windows clustering is installed.

Let open Windows Failover Clustering and see that the IP is assigned to the cluster.

Another item you will notice that is different from previous versions of Exchange is there are not clustered resources, no disks, not CMS/EVS.

The DAG only users Windows Clustering for heartbeat and quorum the new Active Manager is used to manage the DAG failover.

Configuring the networks

  1. Go to the Exchange management console àOrganization configurationàMailboxàDAG Tab. Below you will see networks.
  2. Select the Production network à go to properties and uncheck the checkbox “Enable Replication”.

  3. Click ok.
  4. Open Exchange management shell and run the below command:

“Set-DatabaseAvailabilityGroupNetwork -Subnets ReplicationSubnet  -id DAGname\ReplicationNetworkname -ReplicationEnabled:$true”

“Set-DatabaseAvailabilityGroupNetwork -Subnets MApiSubnet  -id DAGname\MapiNetworkname -ReplicationEnabled:$false”

Changing the name and path of the Database

By default Exchange gives its own name to the database and default path. To change the name and path we will follow the below steps:

  1. Launch the Exchange Management Shell
  2. To dismount the database, run the following command:

    Dismount-Database “Mailbox Database <GUID>”

  3. To change the mailbox database name run the following command:

    Set-MailboxDatabase “<Old DB Name>” –Name “<New DB Name>”

  4. To change the location of the database’s transaction logs and the location of the database file, run the following command:

    “Move-DatabasePath “<New DB Name>” -LogFolderPath:<New Log Path> -EdbFilePath “<New DB Path\FileName.edb>”

  5. To mount the database, run the following command:

    Mount-Database “<New DB Name>”

  6. Repeat the steps for all 4 databases.
  7. To create a new database run the below command

    New-Mailboxdatabase -server servername -name DBname –Edbfilepath “DBpath\filename.edb” -logFolderPath “LogPAth”

Creating the copy of the database for DAG

  1. Launch the Exchange Management Shell
  2. Run the following cmd. I want replication should not use the MAPI network so I am forcing dedicated replication network and running 3 cmds else 1st cmd is good enough.
Add-MailboxDatabaseCopy -Identity <DBName> -MailboxServer <2nd mailboxservername> -ReplayLagTime 0.00:00:60 –truncationlagtime 0.00:00:60 -ActivationPreference 2
Suspend-MailboxDatabasecopy –identity <DBName>
Update-MailboxDatabaseCopy -Identity <DBName> -SourceServer <sourcemailbox server> -DeleteExistingFiles -Network <DAGname\ReplicationNetworkname>
  1. Now create a new db on the second server. Follow the same steps on all 4 dB.
  2. To check the log copy status run the following cmd:

    Get-Mailboxdatabasecopystatus –identity <Databasename>


Categories: Exchange 2010 - Microsoft