Configuring Database Copies in an Exchange Server 2013 Database Availability Group

In the last article in this series on Exchange Server 2013 Database Availability Groups we looked at the steps required for creating a DAG with two members.

In this article we will take a look at configuring database copies in the new DAG.

At this stage we have a database availability group with two Mailbox servers and a single database.

exchange-2013-dag-database-01

What we want to do is configure that database so that is is replicated to the second DAG member. This is referred to as adding a database copy.

An important step before adding the database copy is verifying that the same storage path exists on the server we’re adding the database copy to. The folder paths for the database as are as follows:

[PS] C:\>Get-MailboxDatabase "Mailbox Database 1" | select edbfilepath,logfolderpath

EdbFilePath   : E:\Mailbox Database 1\Mailbox Database 1.edb
LogFolderPath : F:\Mailbox Database 1

E:\ and F:\ volumes have been configured on the second mailbox server already, so it is good to go.

In the Exchange Admin Center navigate to Servers -> Databases and select the database you wish to add a copy of. Click the “” icon and choose Add database copy.

exchange-2013-dag-database-02

Click Browse and choose the mailbox server to add a database copy to.

exchange-2013-dag-database-03

The Activation preference number will automatically increment to the next available number. E15MB1 already hosts the database with preference 1, so in this example the activation preference for the new database copy is 2.

Activation preference should generally reflect the order in which you’d like mailbox servers to host the active database copy, with 1 being the first preference, because it is used as a factor in automatic failover scenarios as well as when manually rebalancing the DAG.

If you click more options you’ll see additional settings for replay lag and for postponing the initial seed of the database copy. Neither of these are required for this particular scenario so I am not going to configure them at this stage.

Click Save to add the database copy.

exchange-2013-dag-database-04

If you look in the file paths on the server that you’re adding the database copy to you should see the seeding files as the database and transaction log files are copied across.

exchange-2013-dag-database-05

A small database over a fast network should not take more than a few minutes to finish seeding. Larger databases or slower networks will of course take longer.

exchange-2013-dag-database-06

When the operation is complete the second server will be hosting a passive database copy that is kept up to date through a process of continuous replication from the active database copy.

exchange-2013-dag-database-replication

The Exchange Admin Center will now show that two servers have copies of the database.

exchange-2013-dag-database-07

To the right of the page you’ll also see some more information about the health of the database copies.

exchange-2013-dag-database-08

Or you can also use Get-MailboxDatabaseCopyStatus to check the database copy health.

[PS] C:\>Get-MailboxDatabaseCopyStatus "Mailbox Database 1" | ft -auto

Name                      Status  CopyQueueLength ReplayQueueLength LastInspectedLogTime  ContentIndexState
----                      ------  --------------- ----------------- --------------------  -----------------
Mailbox Database 1\E15MB1 Mounted 0               0                                       Healthy
Mailbox Database 1\E15MB2 Healthy 0               0                 6/02/2013 10:14:37 PM Healthy

In the next part of this article series we’ll look further at managing database switchovers for Exchange 2013 Database Availability Groups.

About Paul Cunningham

Paul is a Microsoft Exchange Server MVP and publisher of Exchange Server Pro. He also holds several Microsoft certifications including for Exchange Server 2007, 2010 and 2013. Connect with Paul on Twitter and Google+.

Comments

  1. It is really useful info and great blog.

    Thank you for your effort..!

    Cheers..!

  2. Paul, I really enjoy your articles, they are complete and easy to follow. I’m preparing to introduce Exchange 2013 to my existing 2007 Exchange environment. I plan on using a co-existing scenario but I’m curious to know if it is possible to build a 2013 DAG before I move my production over from the 2007 server? From everything I’ve read, I don’t see that this should be a problem. Any advice you could offer would be greatly appriciated. I will be using your articles to plan, prepare and deploy my new Exchange environment. Thanks for your efforts in helping out the Exchange community.

    • You can create the DAG before or after your migration, it is entirely your choice. Exchange 2010 & 2013 both enable “incremental deployment” of DAGs. Adding a mailbox server to a DAG, adding database copies, these are all “no outage” actions.

  3. Hi,

    I have succesfully created the first dag, named dag01 with member server mbx01 and mbx02, the mailbox database replicated belong to mbx01.
    I would like to create a secondary dag named dag02 to replicate the mailbox database of mbx02 but I cannot find mbx01 and mbx02 on the add member menu. Do you have an idea ? thank you very much.

  4. It was great to follow the step by step guide but I ended up with error, my “Users Mailbox Database” is not mounting, and getting the result as below.

    In my case I used the “Users Mailbox Database” and Log files are in the same path, D:\Users Maibox Database\.

    In addition my primary mailbox db which was created during the installation also dismounted and can’t mount in MBX02 – getting same error. (In my case primary server MBX02)

    [PS] C:\Windows\system32>Get-MailboxDatabaseCopyStatus “Users Mailbox Database” | ft -auto

    Name Status CopyQueueLength ReplayQueueLength LastInspectedLogTime
    —- —— ————— —————– ——————–
    Users Mailbox Database\MBX02 DisconnectedAndResynchronizing 0 0 20/09/2013 2:30:06 P
    Users Mailbox Database\MBX01 Dismounted 0 0

    [PS] C:\Windows\system32>mount-database ‘Users Mailbox Database’
    Database ‘Users Mailbox Database’ can’t be mounted on server ‘MBX01.domain.com’ due to a previous error:
    The Microsoft Exchange Replication service encountered an unexpected error in log replay for database ‘Users Mailbox
    Database\MBX01′. Error MapiExceptionMountInProgress: Unable to mount database. (hr=0×80004005, ec=2612)
    Diagnostic context:
    Lid: 65256
    Lid: 10722 StoreEc: 0xA34
    Lid: 1047 StoreEc: 0xA34
    Verify that the underlying cause of the error has been corrected before attempting to mount the database. The error
    can be ignored and the mount allowed if Mount-Database is reissued with the -Force switch.

    This database got only 2 users, I used for testing after setup 2 mailbox servers in Ex2013, and planned to do the migration from Ex2010. I stuck in this point,

    Any suggestion Paul.

  5. Thanks for the great articles, I received links from Microsoft to these posts. I’m working on a DAG between two datacenters and I’m having trouble with this step of the process. I have two mailbox databases that I’m trying to copy from Datacenter A to Datacenter B. It is giving me this error message:

    error

    The seeding operation failed. Error: An error occurred while performing the seed operation. Error: An error occurred while processing a request on server ‘EX2013A’. Error: Database ‘d2f1a881-cfdd-462a-bb40-3cdae823afb2′ was not active on source server ‘EX2013A’. [Database: Resource2013, Server: EX2013B.domain.com]

    Thanks in Advance,
    Joe

    • Are you trying to seed from an active and healthy database copy?

      • Yeah, I found that I had some issues with the cluster. The cluster is showing up on all networks now. After resolving that the databases on server A are showing in an unknown status on server B and likewise the other direction. I’m seeing an RPC service unavailable between the two servers. So I think that is my next hurdle is getting that issue resolved.

  6. Hi Paul,

    Great articles. Great Blog. Thanks for helping the Exchange Community. God Bless you Paul.

    Yann

Leave a Comment

*

We are an Authorized DigiCert™ SSL Partner.