Exchange Server Circular Logging

Introduction to Microsoft Exchange 2003 Circular Logging
There is no doubt, log files consume disk space. Cheapskates conserve disk space by implementing Circular Logging on their Exchange 2003 storage groups. Those who want a reliable disaster recovery manage their disk space and so avoid the need for Circular Logging.

What is Circular Logging?
In a nutshell circular logging recycles the logs. Exchange relies on transaction or write-ahead logs to store events before they are committed to the database. When 4 logs have been filled up, Circular logging assumes that the first log must have been committed and recycles the logs to save disk space.

Problem with Circular Logging
The fatal flaw with Circular Logging is it restricts disaster recovery. If you allow Circular Logging to over-write the transaction logs then Exchange 2003 can only restore as far as the last backup. When all the logs are available, Exchange 2003 automatically rolls forward the logs and replays the transactions up until the Exchange Store stopped working.

In fact, circular logging prevents Exchange 2003 making differential or incremental backups. So with circular logging in place, you are restricted to normal (full) backup.

Where do you check the circular logging setting?

 * 1) Open the Exchange System Administrator, locate the Servers Icon.
 * 2) Drill down to the Storage Group where you want to enable circular logging. (Note Storage GROUP not Store...)
 * 3) Right-click (The Storage Group), and select Properties.
 * 4) On the General tab, tick Enable circular logging, and then click Yes.

Why does Exchange 2003 have such a risky setting?
The main justification for circular logging is when you are very short of disk space. Even in this situation Exchange 2003 has two files Res1.log and Res.log. However these logs are only for the emergency when the disk is truly full. Exchange writes all uncommitted transactions to these files, then shuts down the server.

Other suggestions for Circular Logging are for public folders or newsgroups where you are less concerned with recovery since the last backup.

Disaster Recovery of Exchange 2003 Stores
When an email arrives, Exchange 2003 writes a transaction to the log. If the server's disk is busy there will be a delay before the information is committed to the store database file. Exchange also uses a checkpoint file. This file (E0.chk) records which transactions have been written to the store database (Priv1.edb).

So, if you allow circular logging to over-write some of those transaction logs, then you cannot recover any data after the last backup. However, if you disable circular logging, then you Exchange 2003 replays the transactions and restores the Exchange store to how it was before the disaster. This re-reading the logs is called a hard recovery and happens automatically.