How to Find Exchange Server 2010 Databases with Circular Logging Enabled

An Exchange Server 2010 administrator may want to find out if any of the mailbox databases in the organization have been configured for circular logging.  However the Exchange Management Console does not make this information visually available.

The Exchange Management Shell can be used to determine which mailbox databases are enabled for circular logging by running the following command.

[PS] C:\>Get-MailboxDatabase | where {$_.CircularLoggingEnabled -eq $true}

Name                           Server          Recovery        ReplicationType
----                           ------          --------        ---------------
Mailbox Database 02            EX1             False           Remote
Mailbox Database 04            EX2             False           None

Another technique is to list all mailbox database sorted by their circular logging settings.

[PS] C:\>Get-MailboxDatabase | select name, circularloggingenabled | sort circularloggingenabled -desc | ft -AutoSize

Name                CircularLoggingEnabled
----                ----------------------
Mailbox Database 04                   True
Mailbox Database 02                   True
Mailbox Database 01                  False
Mailbox Database 03                  False

Here is a method that can be used to disabled circular logging on each of the mailbox databases. Because the change doesn’t take effect until the mailbox database is dismounted and mounted again, this method also performs that task.

Caution: this may cause a disruption to mailbox access for your end users, so I do not recommend running this outside of maintenance windows.

Firstly, read the mailbox databases that have circular logging enabled into an array.

[PS] C:\>$dbs = Get-MailboxDatabase | where {$_.CircularLoggingEnabled -eq $true}

You can see now that the two mailbox databases are in the array.

[PS] C:\>$dbs

Name                           Server          Recovery        ReplicationType
----                           ------          --------        ---------------
Mailbox Database 02            EX1             False           Remote
Mailbox Database 04            EX2             False           None

Now use the following commands to modify the circular logging setting on each mailbox database, dismount it, and mount it again.

Caution: I repeat my earlier warning that this may disrupt mailbox access for your end users. Proceed with care.

[PS] C:\>foreach ($db in $dbs)
>> {Set-MailboxDatabase -Identity $db -CircularLoggingEnabled $false
>> Dismount-Database -Identity $db -Confirm:$false
>> Mount-Database -Identity $db
>> }
>>

Note: press Enter after each line and once more at the end to start processing the for loop.

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+.

Leave a Comment

*

We are an Authorized DigiCert™ SSL Partner.
Loading...

Still running Exchange 2003? Time to get moving and start your upgrade. Find out how - Click Here