Database Availability Group (DAG) -Exchange 2010
Database Availability Group (DAG)
Now that Exchange 2010 has been officially released and I am allowed to blog on the topic I wanted to start with what I believe is one of the best features added to Exchange 2010. There may be some heart break of the removal of a few features from Exchange 2007 however Database Availability Groups (DAG) is a feature that has been ask for over years. To better under what a DAG is let’s recap through Exchange.
Exchange 2007 introduced LCR, CCR, SCC and SCR
LCR (local continuous replication) this was mainly used for small business who wanted to replicate a copy of their Exchange database to another disk on the same server.

SCC (Single copy cluster) was what I would call a traditional Exchange cluster which used shared storage to host the Exchange database.
Basic architecture of an SCC

CCR (cluster continuous replication) was used to replicate Exchange database information between 2 Exchange server allowing for hardware and storage redundancy but was limited to 1 Active node and 1 Passive node.
Basic deployment of CCR

SCR (standby continuous replication) was introduced in Exchange 2007 SP1 to provide the ability to replicate Exchange databases to an disaster recovery location.

How did it use to work?
The concept of a DAG and how it functions I believe is easier learned by someone who hasn’t worked with Exchange clusters previously.
In Ex 200X an Exchange server was installed as either an Active or Passive cluster node at the time setup.exe was run.
Depending on which version of Exchange you installed you had to create an Exchange virtual server (EVS) which was changed to cluster mailbox server (CMS) in Exchange 2007.
When a user connected Outlook the mailbox server name was a clustered resource which moved between any number of nodes on the Exchange cluster. This allowed for no end user configuration changes all the resource moved between physical servers
An Exchange database was associated with the clustered resource and when you open EMC/ESM the only Exchange server name that was shown was the clustered node, let’s call is CMS1. That means database one would always belong to CMS1 even when this moved between physical machines.
Here comes the DAG
So now it’s time to forget everything that I just mentioned previously in this article about Exchange clustering.
What has been removed?
- No more EVS/CMS
- Database is no longer associated to a Server but is an Org Level resource
- There is no longer a requirement to choose Cluster or Non Cluster at installation, an Exchange 2010 server can move in and out of a DAG as needed
- The limitation of only hosting the mailbox role on a clustered Exchange server
- Storage Groups have been removed from Exchange
Is anything the same?
1. Window Enterprise Edition is still required since a DAG still uses pieces of Windows Failover Clustering
What’s New?
1. Other roles can be install on the mailbox server when it is a member of a DAG
2. A database name must be unique in the Exchange Org

Let’s walk through the installation of Exchange 2010 and then setup our DAG
I am going to pickup where I left off in the following post http://www.exchange-genie.com/2009/04/exchange-2010-installing-the-mailbox-role/ where we walked through the exchange installation.
1. Open EMC -> Expand Orgnaization componets and select the database availability group tab
2. Right click and select New Database Availablity Group
3. We are now ask to fill in 3 pieces of information for our DAG
a. DAG name
b. FileShare witness (fsw) UNC path (can be any machine)
c. phycial location on the server that will host the fsw
You can see I am using my DC in the lab for the fsw machine, note that whatever machine you are using as the fsw needs to have the Exchange Trusted Subsystem group in the local Admins group
4. Click Finish on the completion page
We have now created our first DAG, if we open active directory users and computers we will see a computer objects gets created with the DAG name we supplied
This object is used by Windows clustering
After the wizard completes 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
[PS] C:\>Get-DatabaseAvailabilityGroup | fl
Name : GenieDAG
Servers : {E14-EX1}
FileShareWitnessShare : \\E14-DC1\GENIEFSW
FileShareWitnessDirectory : C:\GENIEFSW
AlternateFileShareWitnessShare :
AlternateFileShareWitnessDirectory :
NetworkCompression : InterSubnetOnly
NetworkEncryption : InterSubnetOnly
DatacenterActivationMode : Off
StoppedMailboxServers : {}
StartedMailboxServers : {}
OperationalServers :
ControllingActiveManager :
ReplicationPort : 0
NetworkNames : {}
AdminDisplayName :
ExchangeVersion : 0.10 (14.0.100.0)
Identity : GenieDAG
WhenChanged : 4/17/2009 7:22:42 PM
WhenCreated : 4/17/2009 7:22:42 PM
OrganizationId :
OriginatingServer : E14-DC1.ExchangeGenie.Local
IsValid : True
Lets add our first node to the DAG
1. in EMC right click our DAG and select manage database availability group
2. On the manage database availability group page click the Add button
3. In the select mailbox server window select the appropriate mailbox server in my case its e14-ex1
4. click Manage
after selecting manage Windows clustering is installed at this time
5. Click finish on the completion page
6. We can now see that E14-ex1 was added to the DAG
If we open our Admin tools we will see the Windows clustering is installed and that E14-ex1 is a member of the cluster
note: by default the DAG is set to use DHCP to assign and address to it, in the current build there is no way to assign an IP to the DAG in gui. This can be done when adding a node to the DAG from EMS.
Let see what it looks like to add the server from EMS
1. Open EMS (use the local shell currently) add-databaseavailabilitygroupserver GenieDag -mailboxserver E14-ex1 -databaseavailabilitygroupIpAddress 192.168.1.60
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 hear beat and quorum the new Active Manager is used to manage the DAG failvoer.
We have currently created a DAG with only 1 Exchange server which does not do us any good as DAG nodes can only replicate to another server, so we will need to add another node.


















April 16th, 2009 at 1:13 pm
[...] 1) Forget about CCR and SCR and think Database Availability Group… DAG is the new way of doing HA and DR. Deploying DAG is easier than ever as it will deploy the necessary Windows Clustering components for you. Also you can now get up to 16 replica’s of your mailbox database and the failover granularity is now on Database level instead of Server level. Have a look here for more information http://www.exchange-genie.com/2009/04/database-availability-group-dag-exchange-2010/ [...]
May 11th, 2009 at 9:29 am
DAGs use a subset of Windows Failover Clustering technologies, namely, the cluster heartbeat, cluster networks, and the cluster database (for storing data that changes or can change quickly).
Because DAGs rely on Windows Failover Clustering, they can only be created on Exchange 2010 Enterprise Edition Mailbox servers that are running Windows Server 2008 Enterprise or Windows Server 2008 Datacenter. In addition, each Mailbox server in the DAG must have at least two network interface cards in order to be supported.
When a DAG is formed, the failover cluster that is created will initially use the Node Majority quorum mode. When the second Mailbox server is added to the DAG, the cluster quorum is automatically changes to the Node and File Share Majority quorum model. When this change occurs, the DAG will begin using the specified UNC path and directory for the cluster quorum. If the specified UNC path and directory does not exist, the Add-DatabaseAvailbilityGroupServer cmdlet will automatically create them, and provision them with full control permissions for local administrators and the CNO computer account.
June 12th, 2009 at 2:29 am
I’m using 2 mailbox server role for creating member of DAG.But I cannot add both of them to DAG. The one is ok, the one cannot start failover cluster service.I don’t know why?
June 12th, 2009 at 8:09 am
How are you trying to add the server EMC or EMS ? Are you using the public beta…
August 3rd, 2009 at 2:02 am
DAG in Exchange 2010 Beta step by step at http://thuc.nhatnghe.vn/ex2010-dag
September 4th, 2009 at 7:15 am
really it`s good jop ,,keep it up
September 16th, 2009 at 2:08 am
DAG also support windows server 2008 R2 enterprise edition work or not?
September 16th, 2009 at 9:20 am
Yes, Ex 2010 is supported on Windows 2008 SP2+ and Windows 2008 R2… you cannot have a mixed cluster with Winodws 2008 and Windows 2008 R2
October 7th, 2009 at 7:15 pm
Hi Exchange-Genie!
Thank you very much for the content, wonderful piece! I am curious however? In step 3 you mention using your DC as the FSW and then follow-up with a requirement that the Exchange Trusted Subsystem security group be added to the local Administrators group. To my knowledge that is not possible on a DC (Domain Controller). Did you add the Exchange Trusted Subsystem security group to the Domain Admins group?
Thank you in advance for your comments…
October 8th, 2009 at 5:32 pm
There is a built in container which hosts a group called Administrators that you can use (open dsa.msc and you will see the container)…. I do not advicate using the DC as the FSW unless that is the only other server you have.
October 12th, 2009 at 3:18 pm
Thank you for your quick reply, it worked!
This is a temporary solution as the DC is the only other server in the domain.
November 11th, 2009 at 1:39 pm
Thank you very much excellent article. I have a question if you could assist me.
Raghu posted:
When a DAG is formed, the failover cluster that is created will initially use the Node Majority quorum mode. When the second Mailbox server is added to the DAG, the cluster quorum is automatically changes to the Node and File Share Majority quorum model.
I have added a second server to the DAG. But I am still getting a warning.
Node Majority – Warning: Failure of a node will cause the cluster to fail.
November 11th, 2009 at 1:46 pm
What machine did you specify as the fsw? Did the file share get created and is accessible from each dag node? you need to make sure the server to host the fsw has the exchange trusted subsystem group in the local admin
November 12th, 2009 at 12:01 pm
Confused!
The ‘Managing Database Availability Groups’ article in TechNet states: “Because DAGs rely on Windows Failover Clustering, they can only be created on Exchange 2010 Mailbox servers that are running Windows Server 2008 Enterprise Edition or Windows Server 2008 R2 Enterprise Edition.”
So if I am installing Exchange Server 2010 Standard Edition on a Windows Server 2008 x64 Standard Edition what features of DAG (if any ) do I have? Will Exchange Server 2010 Standard Edition allow an active/passive LCR of the database and logs using two HBAs and arrays and one server like I am doing with Exchange 2007.
November 12th, 2009 at 3:06 pm
Yes that is correct.. With Exchange 2010 the main difference between Exchange Standard and EE is the number of databases you can create. Standard limits you to 5 databases where EE allow you to create 100.
To use a dag you need WFC (windows failover cluster) but the selection of Exchange lisc. just depends on the number of dbs.
http://social.technet.microsoft.com/Forums/en-US/exchange2010/thread/dadc99c8-5b7b-4bb7-9b3a-5623646cbe78/
November 14th, 2009 at 6:15 am
Thank you for this great article.
Is it necessary for Servers in DAG to have to network cards, or it goes all though LAN. What are best practises
November 15th, 2009 at 1:14 pm
This support for this recently changed but best practice would be to have multiple network cards so you can have a dedicated replication network seperate from your mapi network. You can control which networks are configured as what via EMS with the get-DatabaseAvailabilityGroupNetwork command
December 4th, 2009 at 8:30 pm
Hello, great article. I have a question. I have created the DAG, but when I set up an outlook client and point it to the DAG name, it does not work. I can ping the DAG name but it won’t connect. Any idea?
Thanks.
December 4th, 2009 at 10:28 pm
sorry, another question. do the two mailbox servers share a disk with the mailbox database? I don’t get how they become redundant. for example, if I set up the first mailbox server to use it’s local I drive, do I also present that disk to the 2nd server so it can share the data or would you need to disks, but both servers set up identically? It’s so new I am having trouble finding docs on it.
December 5th, 2009 at 11:16 am
1. clients do not connect to the DAG that connect to the rpc end point which is the cas server or rpc array. Please see this article explaining that one. http://www.exchange-genie.com/2009/09/momt-mapi-on-the-middle-teir/
No, you can use whatever storage you like but they are sepearate, once you add the nodes to the DAG you then setup a replica on the database and you will then have 2 copies of the data so you are redundant with the server and data.
January 4th, 2010 at 4:23 pm
Hi!
I tried creating a DAG on a lab environment (2 exchange 2010 servers with CAS,hub and mailbox roles, and 1 Windows 2003 R2 DC) but despite adding \Exchange Trusted Subsystem\ to \BuiltinAdministrators\ and even adding domain controller’s computer account to \Exchange Trusted Subsystem\ (I know that shouldn’t be done, but I’m desperate here
) it fails to create the DAG. This is the error:
———————————————
Summary: 1 item(s). 0 succeeded, 1 failed.
Elapsed time: 00:00:01
DAG-01
Failed
Error:
Access is denied. (Exception from HRESULT: 0×80070005 (E_ACCESSDENIED))
Warning:
An unexpected error has occurred and a Watson dump is being generated: Access is denied. (Exception from HRESULT: 0×80070005 (E_ACCESSDENIED))
Exchange Management Shell command attempted:
New-DatabaseAvailabilityGroup -Name ‘DAG-01′ -WitnessServer ‘WIN2003DC’ -WitnessDirectory ‘c:w’
Elapsed Time: 00:00:01
———————————————
The command is run as the domain Administrator.
Any hint on this is appreciated.
Thanks!
January 4th, 2010 at 11:00 pm
1. is the witness directory already created?
a.try creating the new directory
2. did you really put c:w or c:\w ?
Let me try to repro…
January 29th, 2010 at 6:00 am
Great article, many thanks!
February 18th, 2010 at 7:53 pm
We are about to move forward with Exchange 2010. We have done quite a bit of research regarding the Exchange 2007 to 2010 path but have not found an answer to some of our questions.
Our current Exchange 2007 configuration is as follows:
• 2 Exchange 2007 Mail Server servers
• Running in a SCC environment
• Servers connected via a Windows Cluster (cluser name: “email”)
• SAN is hosting the Exchange DB and Logs
***If more than one server accesses a database on a LUN it causes corruption. This means the new Exchange 2010 database cannot reside in the same LUN where there Exchange 2007 SCC database is stored***
We would like to move forward with the same layout for our Exchange 2010 environment using DAG. To minimize the impact to the Outlook users, we also need to keep the same cluster name (email) while we migrate the mailboxes.
Microsoft replied to this question with the following statement:
“According to the specialist, to have both using the same name, the SCC and DAG cannot be running at the same time. He recommended that the best option would be to rename the DAG, and plan accordingly around the name change.”
How should we proceed? I have looked through the Technet site and was not able to find any articles that would help.
Is there a way to perform this upgrade without effecting our Outlook 2007 users?
Thanks,
Colby
February 19th, 2010 at 12:41 pm
In Exchange 2010 the concept of single storage for HA is gone, there is no equivalent to SCC cluster. A DAG technology combines CCR clustering and SCR cluster from Exchange 2007 and uses replication.
You should use different storage connected to each mailbox server so that you have redundancy with hardware and storage.
When you setup a DAG there will be no disk resources in the cluster, ex 2010 only uses the heartbeat and cluster database of a Windows failover clustering.
February 26th, 2010 at 12:46 pm
Great Article!
The next thing is: how to make the CAS Server HA…?
Great to have a DAG with eg. 3 or 4 MBX in it but the CAS Server ist a SPOF
Maby you have a good howto for that, too?
February 26th, 2010 at 2:27 pm
Did you read the artlce on rpc arrays for ex 2010 it talks about CAS load balances for mapi access and you can configure NLB for external users to make CAS server redundant
February 27th, 2010 at 5:03 am
I didn’t, but I will do it NOW
Great!
March 2nd, 2010 at 7:03 pm
Genie,
This article is great but it would be great if you can post another article explaining the high availbility on the front end servers running the hub transport and the client access role.
Thanks!
March 3rd, 2010 at 2:15 pm
Are you looking for information on the rcp arrays or just OWA etc… I have written an artile show CAS NLB for mapi connection with the new rpc client access array
http://www.exchange-genie.com/2009/09/momt-mapi-on-the-middle-teir/