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.
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.
Click Browse and choose the mailbox server to add a database copy to.
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.
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.
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.
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.
The Exchange Admin Center will now show that two servers have copies of the database.
To the right of the page you’ll also see some more information about the health of the database copies.
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 some of the administrative tasks for managing database copies.