ENTERPRISE

Exchange Server 2010 : Developments in High Availability (part 2) : Configuring a Database Availability Group & Managing database copies

2/8/2011 9:12:32 AM

3 Configuring a Database Availability Group

To configure a Database Availability Group, at least two Exchange Server 2010 Mailbox Servers are required. Imagine a four server deployment, one Exchange Server 2010 Client Access Server, one Exchange Server 2010 Hub Transport Server and two Exchange Server 2010 Mailbox Servers (EXMBX01 and EXMBX11). All four servers are located in the same Active Directory site, and this site is also the Internet-facing Active Directory site.

Figure 4. A four server Exchange 2010 deployment.

Let's assume that all four servers are fully operational and working fine. To create a Database Availability Group for the two Mailbox Servers, an additional private network is needed, which will be used for replication purposes.

To create a Database Availability Group follow these steps.

  1. Log on to an Exchange Server and open the Exchange Management Console.

  2. Expand the Exchange On-Premises (SERVER), and then expand the Organization leaf. Click the Mailbox and then click the Database Availability Group tab. No items will be shown in the results pane.

  3. On the Mailbox Server, open the Exchange Management Shell and then enter the following command:



  4. A new Database Availability Group with the IP address of 10.0.0.101 will be created. Since the Database Availability Group is nothing more than a placeholder in Active Directory, it can be seen with ADSIEdit.

    Figure 5. An empty Database Availability Group.
  5. To add the first Mailbox Server (EXMBX01) to the Database Availability Group, switch back to the Exchange Management Shell and enter the following command:



  6. The specified Mailbox Server will now be added to the Database Availability Group. Furthermore, a File Share Witness will be created on the Hub Transport Server. The File Share Witness, just like in an Exchange Server 2007 CCR environment, is needed to create a majority in the cluster when a server fails. The actual addition of the Mailbox Server and the creation of the File Share Witness can take up to 45 seconds.

  7. When switching back to the Exchange Management Console you can now see the Database Availability Group (DAG1) in the console, as well as the EXMBX01 we just added.

  8. Click the Database Management tab in the Exchange Management Console. You'll see the initial databases on the first and second Mailbox Servers. Also notice that there's one database copy available on each server. When you select the Public Folder Database in the Database Management tab, the Database Copies results pane is grayed-out. This is because Public Folder replication and Database Replication are not compatible.

  9. To add the second Exchange Server 2010 Mailbox Server to the Database Availability Group, log on to the second server and open the Exchange Management Shell. Enter the following command:



  10. The second Mailbox Server will now be added to the Database Availability Group. As with adding the first Mailbox Server, this can take several seconds to finish.

NOTE

If the Windows Fail-over clustering components are not already installed on the Mailbox Server, they automatically will be. You can also manually install them in advance by opening a command prompt and execute the following command:

ServerManagerCmd.exe –i Failover-Clustering

Right, now we have created a Database Availability Group with two mailbox servers and we're ready to configure Database Copies. The Database Availability Group feature is very flexible. As I've explained, there's no need to configure a Windows Fail-over cluster in advance; you can add a Mailbox Server to the DAG whenever needed – even a year later – without a problem. Just install a Mailbox Server, install the Fail-over clustering bits, and add the server to the DAG. This is known as Incremental Deployment.

It is also possible to create site resilience using the Database Availability Group. Besides adding Mailbox Servers in the same Active Directory site (i.e. in the same datacenter), you can also add Mailbox Servers in another Active Directory site, such as in another datacenter. As long as the network connectivity is good enough to handle the replication in a timely manner, and as long as the Hub Transport and Client Access Servers have a reliable network connection to the other datacenter, you're ready to go.

If you want to add a Mailbox Server in another site to the DAG, a few configuration changes are needed. The IP Address of the DAG in the other site has to be added to the local DAG, and since this is not possible with the Exchange Management Console, the Exchange Management Shell has to be used. Enter the following command:



The first network in the DAG will be automatically created during the addition of the first Mailbox Server. Additional networks are not created automatically, so you have to add the subnet of the second site to the DAG manually:



NOTE

If there are Domain Controllers in the site you just added, you must wait for the replication to finish, or else force the replication to start. Otherwise the Domain Controllers in the second site may not have enough knowledge about the changes you want to make.

At this stage you can add a Mailbox Server in the second site to the DAG using the Exchange Management Console or the Exchange Management Shell:



4 Managing database copies

A database copy is exactly what its name implies: a copy of an active database, but on another Exchange Server, in the same Database Availability Group. When initially configured, a copy of the database file is copied via the network to the other server and when finished, Exchange Server 2010 starts replication of the log files of this particular database over the network to the other server.

The relative location of the passive copy of the database is also identical to the location of the active copy. For example, an initial database on an Exchange Server 2010 Mailbox Server can be located in the directory "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database 1444276156." If a database copy is enabled for this server, the same directory is created on the second server. The process of copying a database to a second location is known as seeding.

It is best practice to use separate disks for Exchange Databases, both from a performance perspective as well as a disaster recovery perspective. Although meant for earlier versions of Exchange Server, Microsoft knowledge base article 328794 explains more: HTTP://TINYURL.COM/SEPARATEDISKS.

After configuring "Mailbox Database 1444276156" to use the separate disk G:\ for storing its information, the database copy can be configured:

  1. On the target server, i.e. the server that will hold the database copy, make sure there's an identical volume as on the source server. The target server in this example needs a separate G:\ disk as well.

  2. Open the Exchange Management Console, expand the "Microsoft Exchange On-Premises (EXMBX01)", then expand the Organization Configuration container, and then click on the Mailbox node. Select the Database Management tab.

  3. Select "Mailbox Database 1444276156." In the lower part of the results pane there's one copy, the active copy, located on the first Exchange server EXMBX01. Right-click "Mail boxDatabase 1444276156" and select "Add Mailbox Database Copy..."

  4. In the Add Mailbox Database Copy wizard, select "Browse" to select a Mailbox Server that will hold a copy of the database. The "Activation Preference Number" is the order in which Exchange will make a passive copy into an active copy when the preceding active copy fails. Of course, this number is only useful if multiple passive copies are configured (a complete rundown of the Activation Preference Number and what happens when a database becomes active is on the Microsoft TechNet website: HTTP://TINYURL.COM/ACTIVEMANAGER). Click Add to continue.

  5. The database file "Mailbox Database 1444276156.edb" will now be copied to the target server and the replication will be set up. Depending of the size of the Database file, this can take some time.

  6. When the database is copied and the replication is activated, click Finish.

Once completed, log on to the target Exchange server and you'll notice that on this server (on the G:\ disk in this example) a "Mailbox Database 1444276156" directory has been created where the copy of the database is stored. You'll also see the log files that are replicated to this directory.

If a lot of databases are used on an Exchange Server, using mount points is a valid alternative. In a mount point scenario, all data disks are mounted to a directory on the server, for example F:\DB01, F:\DB02, F:\DB03, etc., using Server Manager.

In an Exchange Server 2007 CCR environment, the active server also ships log files to the passive server, which also loads the log files into its copy of the database. However, the passive server is really passive, and the service responsible for the database and the log files (store.exe) is not running. The only service that is running is the replication service. During a failover, the passive node has to start all Exchange services, and all databases need to be mounted before that can happen. In Exchange Server 2010 the store.exe service is already running and the databases are already mounted on all computers in a Database Availability Group, meaning a database failover is much faster, and the result is a much shorter overall failover time.

For maintenance purposes it is possible to move an active database copy from one Exchange Mailbox server to another:

  1. Log on to an Exchange Server and open the Exchange Management Console.

  2. Expand the Exchange On-Premises (SERVER), and then expand the Organization leaf. Click the Mailbox and then click the Database Management tab.

  3. All of the databases in your Exchange Server 2010 environment show up in the upper half of the results pane. Right-click the database you want to move (which is, of course, also a database that has multiple copies configured).

  4. Select "Move Active Mailbox Database" from the context menu.

  5. In the "Move Active Mailbox Database" wizard select Browse to select another server where you want the Active Copy to be moved to.

  6. Click the Move button to move the Active Copy of the database to the server just selected.

 
Other  
  •  Exchange Server 2010 : Developments in High Availability (part 1) : Exchange database replication & Database Availability Group and Continuous Replication
  •  High Availability in Exchange Server 2010 : Exchange Server database technologies
  •  SharePoint 2010 : Cataloging the Best Scripts to Automate SharePoint Administration
  •  SharePoint Administration with PowerShell (part 2)
  •  SharePoint Administration with PowerShell (part 1)
  •  Sharepoint 2007: Approve or Reject a File or List Item
  •  Exchange Server 2007 : Configure the Client Access Server - Enable POP3 and IMAP4
  •  Exchange Server 2007 : Configure the Client Access Server - Enable and Configure Outlook Anywhere
  •  Exchange Server 2007 : Configure the Client Access Server - Create and Apply ActiveSync Mailbox Policies
  •  SharePoint 2010 : Understanding Windows PowerShell Concepts (part 3)
  •  SharePoint 2010 : Understanding Windows PowerShell Concepts (part 2)
  •  SharePoint 2010 : Understanding Windows PowerShell Concepts (part 1)
  •  Managing and Administering SharePoint 2010 Infrastructure : Using Additional Administration Tools for SharePoint
  •  Managing Exchange Server 2010 : Archiving and compliancy (part 3) - Discovery
  •  Managing Exchange Server 2010 : Archiving and compliancy (part 2) - Messaging Records Management
  •  Managing Exchange Server 2010 : Archiving and compliancy (part 1) - Exchange 2010 Archiving
  •  Managing Exchange Server 2010 : Role Based Access Control (RBAC)
  •  SharePoint 2007 : See What Files or List Items Are Checked Out to You
  •  SharePoint 2007 : Publish a File or List Item
  •  SharePoint 2007 : Use the Datasheet View to Add, Edit, or Delete Items and Files
  •  
    Top 10
    Exchange Server 2010 : Active Manager - Automatic database transitions & Best copy selection
    Exchange Server 2010 : Breaking the link between database and server
    iPhone 3D Programming : Drawing an FPS Counter (part 2) - Rendering the FPS Text
    iPhone 3D Programming : Drawing an FPS Counter (part 1) - Generating a Glyphs Texture with Python
    Mobile Application Security : Mobile Geolocation - Geolocation Methods & Geolocation Implementation
    Mobile Application Security : SMS Security - Application Attacks & Walkthroughs
    Transact-SQL in SQL Server 2008 : Table-Valued Parameters
    Transact-SQL in SQL Server 2008 : New date and time Data Types and Functions
    Windows 7 : Working with User Accounts (part 2)
    Windows 7 : Working with User Accounts (part 1)
    Most View
    The ASP.NET AJAX Control Toolkit (part 3) - The AutoCompleteExtender
    IIS 7.0 : Performance and Tuning - Hard Disks
    Exploring an Assembly Using ildasm.exe
    Windows Phone 7 Development : Working with Video (part 1)
    Business Intelligence in SharePoint 2010 with PerformancePoint Services : PerformancePoint Services Overview
    Getting the Most Out of the Microsoft Outlook Client : Implementing Outlook Anywhere
    Designing a Windows Server 2008 R2 Active Directory : Understanding the Federated Forests Design Model
    SharePoint 2010 : PerformancePoint Services (part 1) - PerformancePoint Central Administration Settings
    Securing SharePoint Sites with Forefront TMG 2010 (part 1) - Configuring the Alternate Access Mapping Setting for the External URL
    Leveraging and Optimizing Search in SharePoint 2010 : Customizing the FAST Search User Interface
    IIS 7.0 : Managing Configuration - Delegating Configuration (part 2)
    Silverlight Recipes : Networking and Web Service Integration - Using JSON Serialization over HTTP
    Programming .NET Security : Programming Digital Signatures (part 3) - Using the Signature Formatter Classes
    Programming with DirectX : Sound in DirectX - XAudio2
    SQL Azure : Database-Migration Strategies
    Deploying Applications to Windows Azure
    SQL Server 2008 : Transact-SQL Programming - TRY...CATCH Logic for Error Handling
    Algorithms for Compiler Design
    Building Android Apps: Going Offline - Debugging
    Enabling Presence Information in SharePoint with Microsoft Communications Server 2010