You Can’t Add the First Passive Copy of a Mailbox Database While Circular Logging is Enabled

On an Exchange 2010 server when you attempt to add a mailbox database copy you may receive an error:

Database “MB-BR-01″ has circular logging enabled. You can’t add the first passive copy of a mailbox database while circular logging is enabled. Please disable circular logging before adding the first passive copy of this mailbox database.

Error adding first database copy
Error adding first database copy

This error will occur if you’re trying to add the first database copy for a mailbox database that already has circular logging enabled.

Circular logging enabled for a mailbox database
Circular logging enabled for a mailbox database

The reason this occurs is that circular logging operates in two different modes depending on whether the mailbox database has copies or not.

Circular logging for non-replicated databases (just referred to as “circular logging”) operates in a constant state of log files being written, closed, and overwritten.

Circular logging for replicated databases (known as Continuous Replication Circular Logging, or CRCL) operates differently. With CRCL a log file is written, closed, and then needs to be shipped to the other DAG members that hold a replica of that database and replayed into their copy of the database as well. It is only when the reply has occurred on all other replicas that a log file is removed.

So, in order to add the first database copy for a mailbox database that has circular logging enabled, you must first disable circular logging by unticking the box or running the following Set-MailboxDatabase cmdlet the Exchange Management Shell.

Set-MailboxDatabase mb-br-01 -CircularLoggingEnabled $false

The database must then be dismounted and remounted for the change to take effect. After this you can add the database copy as originally intended.

After the first database copy has been added you can re-enable circular logging if you wish.

Set-MailboxDatabase mb-br-01 -CircularLoggingEnabled $true

Unlike a mailbox database with no additional copies, you can enable circular logging for a mailbox database that has copies in a DAG without dismounting and remounting the database.

As a final word, note that a similar issue will occur if you have CRCL enabled for a mailbox database and try to remove the last database copy. In that situation you will need to disable circular logging, remove the last copy so that only the standalone database exists, and then re-enable circular logging again if you wish.

Leave a Reply

Your email address will not be published. Required fields are marked *