Exchange Server 2010 database availability groups

If you're new to Exchange 2010, you'll need to become familiar with using database availability groups for high availability. This beginner's guide covers all the basics and explains how to configure a DAG in your own environment.

Microsoft concentrated on high availability features in Exchange Server 2010, eliminating local continuous replication, standby continuous replication, single copy clustering and cluster continuous replication, and replacing them with database availability groups (DAGs) and database mobility. This tip introduces Exchange Server 2010's database availability groups and configuration methods.


Database availability groups: The bigger picture
You can consider DAG to be a hybrid replication method of Exchange Server 2007's cluster continuous replication (CCR) and standby continuous replication (SCR). DAGs allow Exchange Server to seamlessly handle onsite and offsite data replication scenarios.

To use DAGs, you need Windows Server 2008 failover clustering installed on mailbox servers. You'll also need Windows Enterprise edition; however, failover clustering is only there for basic clustering functions.

You can pre-install Windows Server 2008 failover clustering before installing Exchange or Exchange Server 2010 . Running the New-DatabaseAvailabilityGroup cmdlet automatically installs failover clustering.

Even though failover clustering is installed, the failover cluster manager does not control any DAG functions. After you've configured DAG, you won't see any resources within the failover cluster tool. All functionality is maintained from the Exchange Management Console (EMC) or in Exchange Management Shell.

The Active Manager component allows you to control DAG. Active Manager receives information from the Exchange Replication Service, which monitors the Extensible Storage Engine (ESE) and all mounted database instances. Active Manager oversees failover when a mounted database fails. If an administrator manually makes a copy of a database of the active copy, this is known as Switchover. Figure 1 shows the process.

How the Active Manager works
Figure 1. How Exchange Server 2010 Active Manager works.

Exchange Server 2010 Database Mobility explained

Many administrators think of database availability groups as a standalone entity; however, it's actually part of a larger technology group within Exchange Server 2010 called Database Mobility.

Database Mobility is comprised of the following components:

  • Incremental deployment
    You can install Database Mobility, including DAG, after you've installed and configured Exchange Server. For example, if you wanted to cluster a basic mailbox in Exchange 2000 Server through Exchange 2007, you'd have to create a new Exchange clustered instance and then move all mailboxes to it. By using incremental deployment, you can configure high availability and implement Database Mobility -- as long as you have the Enterprise versions of Windows 2008 (SP2) or 2008 R2.

    Exchange 2010 no longer includes a clustered model instance; Exchange Database Mobility uses failover clustering. Therefore, you won't have to enter the Failover Admin tool to administer any part of Exchange high availability.

  • Database availability groups
    You can create groups of mailbox servers with up to 16 replicated databases. Your database availability group acts as a replication boundary for each mailbox database. While DAGs can be part of several Active Directory sites and subnets, they must be part of the same AD domain.

  • Mailbox database copies
    Database copies that are stored on mailbox servers; these copies make up the composite DAG.

The fundamentals of DAGs and database copies
The main principles of Database Mobility and DAGs may seem complex at first but, after working with both for a while, they are pretty straightforward.

  • There are up 16 database copies per DAG.

  • Storage groups are not part of the database construct. Each database has its own set of transaction logs.

  • Direct-attached storage (DAS) has become an attractive and cost effective choice. When properly deployed, a DAG uses 50% less disk I/O. And because of how it's deployed, you can even store some database copies on standard JBODS.

  • Each mailbox server within a DAG should have two network interfaces. One interface could be used for replication and the default MAPI network; the interface handles replication. DAG replication traffic is always compressed and encrypted.

  • Mailbox servers can also support other Exchange server roles.

  • Log shipping in Exchange Server 2010 uses TCP sockets -- with each database assigned its own socket. In Exchange Server 2007, log shipping was performed via Server Message Block (SMB), where a single SMB session was used between nodes for all databases within the cluster. The change to TCP sockets results in more efficient replication.

Data is replicated between primary databases on servers MBXSRV-1 and MBXSRV-2. In the event of a database failure, the passive copies of databases DB-01 and DB-02 are brought online on server MBXSRV-02.

How a database availability group works
Figure 2. How a database availability group works.

Configuring a database availability group
A basic DAG configuration is accomplished using five Exchange Management Shell cmdlets. For example, I used the following configuration in the lab:

  • A single Windows 2008 R2 standard Server that acts as both the client access and hub transport server.

  • Two Windows 2008 R2 enterprise servers -- each of which is configured as a mailbox server with 5 GB logs and 5 GB database disks

1. Create a DAG
Open the Exchange Management Shell and type in the following command, which provides a name for the DAG, the name of the File Share Witness Server, its location on the witness server and the IP Address for the DAG:

New-DatabaseAvailabilityGroup -name TTLon -WitnessServer lab-2010htc-01.justice.lab.com -WitnessDirectory c:\TechTargetLonFSW -DatabaseAvailabilityGroupIpAddresses 172.31.253.146

Note: This step will automatically install failover clustering if it's not already installed on the server.

If you've successfully created a DAG, you will see a screen similar to Figure 3.

You have successfully created a DAG in Exchange Server 2010.
Figure 3. This screen informs you that you have successfully created a database availability group.

2. Add a mailbox server to the new DAG
Type in the following command to add a server named LAB-EX2010MB-01 to the TTLon DAG that we created in Step 1. After running this command, repeat it for the second mailbox server that you'd like to incorporate into your DAG configuration:

Add-DatabaseAvailabilityGroupServer -id TTLon -MailboxServer LAB-EX2010MB-01.justice.lab.com

When you press Enter, you will see the screen shown in Figure 4.

Adding a mailbox server to a new Exchange 2010 DAG
Figure 4. This screen informs you that you have successfully added a mailbox server to your new DAG

3. Create and mount a database to use with the DAG on the first mailbox server
The following command creates a new transaction log and database on the path provided to the mailbox server of your choice:

New-MailboxDatabase -Name LAB-EX2010-01-GEN -Server LAB-EX2010MB-01.justice.lab.com -LogFolderPath l:\Exchsrvr -EdbFilePath x:\Exchsrvr\LAB-EX2010-GEN.edb

Hit Enter to produce the output shown in Figure 5.

Creating a new transaction log on your mailbox server.
Figure 5. Result of creating a new transaction log.

You can now mount the database that you just created using the following command:

Mount-Database LAB-EX2010-01-GEN

The output you should see after mounting the database
Figure 6. Output after mounting a database.

4. Add a copy of your previously created database
The command below will add a copy of the database that you previously created to the second mailbox server, with an activation preference of 2. If you had more than two mailbox servers and wanted to add a third copy of this database, you could give the server an activation preference of 3. You could also change the preferences to accommodate the specific server that you'd like to act as the active server, should the primary server fail:

Add-MailboxDatabaseCopy -id LAB-EX2010-01-GEN -MailboxServer LAB-EX2010MB-02.justice.lab.com -ActivationPreference 2

After using the above command, hit Enter and you should see an output similar to that in Figure 7.

Result of adding a copy of your database. .
Figure 7. The output you should see after adding a copy of your database.

ABOUT THE AUTHOR
Andy Grogan is
an Exchange MVP based in the U.K. and has worked in the IT industry for the last 14 years -- primarily with Microsoft, HP and IBM technologies. His main passion is Exchange Server, but he also specializes in Active Directory, SQL Server and storage solutions. Andy is currently working for a large council in West London as the Networks and Operations Manager supporting 6,000 customers on more than 240 sites. You can visit Andy's website at http://www.telnetport25.com/.

This was first published in May 2010

Dig deeper on Microsoft Exchange Server 2010

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchWindowsServer

SearchEnterpriseDesktop

SearchCloudComputing

SearchSQLServer

Close