Become a Columnist Microsoft Exchange Site Microsoft Support SiteMSDN Exchange Site

   

Subscribe to OutlookExchange
Anderson Patricio
Ann Mc Donough
Bob Spurzem
Brian Veal
Catherine Creary
Cherry Beado
Colin Janssen
Collins Timothy Mutesaria
Drew Nicholson
Fred Volking
Glen Scales
Goran Husman
Guy Thomas
Henrik Walther
Jason Sherry
Jayme Bowers
John Young
Joyce Tang
Justin Braun
Konstantin Zheludev
Kristina Waters
Kuang Zhang
Mahmoud Magdy
Martin Tuip
Michael Dong
Michele Deo
Mitch Tulloch
Nicolas Blank
Pavel Nagaev
Ragnar Harper
Ricardo Silva
Richard Wakeman
Russ Iuliano
Santhosh Hanumanthappa
Steve Bryant
Steve Craig
Todd Walker
Tracey J. Rosenblath
 
 

How do you set your Circular Logging?

Professionals:  Disable Circular Logging 99% of the time

Amateurs: Think Circular Logging is the best thing since sliced bread

       Litmus Test:


Why is Circular Logging a bad idea?

During disaster recovery, if you have over-written the transaction logs then you can only restore as far as the last backup.  When all the logs are available, Exchange automatically replays the logs and recovers all the transactions.

What is Circular Logging?

Exchange, SQL and Active directory databases all rely on transaction or write-ahead logs.  Events can be quickly written to the logs, then later 'committed' to the main database file.  Circular logging over-writes these transaction logs to save disk space.

 Circular Logging

  No Circular Logging

 

Log Numbers     Disk Consumption

1 2 3 4 5                 25 MB

2 3 4 5 6                 25 MB

3 4 5 6 7                 25 MB

 

 

Log Numbers     Disk Consumption

1 2 3 4 5                  25 MB

1 2 3 4 5 6               30 MB

1 2 3 4 5 6 7             35 MB

   

How Transaction Logging Works

When a new piece of mail arrives, a transaction is written to the log.  If the server is busy there will be a delay before the information is committed to the main EDB database file.  A separate pointer, called a checkpoint file, maintains a record of how much of the log has been written into the EDB database.

Disaster Recovery of Exchange Stores

Each Exchange Storage Group has one log for up to five individual stores.  One reason for having multiple stores is to reduce the time needed to restore in disaster recovery conditions.

When disaster strikes and you have to restore an Exchange store you need a full backup of the EDB database and all the logs since the the last backup.  So, if you allow circular logging to over-write the logs, then you lose all data since the last backup.  However, if you disable circular logging, then you Exchange magically replays all the logs and brings back the Exchange store to how it was before the disaster.  This re-reading the logs is called a soft recovery and happens automatically.

Where do you check the circular logging setting?

  1. Open the Exchange Administrator, double-click Servers.
  2. Select the server which has the storage group you want to enable circular logging.
  3. Right-click the storage group, and then click Properties.
  4. On the General tab, click Enable circular logging, and then click Yes.

Why does such a potentially harmful setting exist?

The one time you may need circular logging is if your disk is full.  When you first install a database you always think 'no way will the disk ever get full' - experience teaches it will!

 

Disclaimer: Your use of the information contained in these pages is at your sole risk. All information on these pages is provided "as is", without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by Stephen Bryant or Pro Exchange. OutlookExchange.Com, Stephen Bryant and Pro Exchange shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.

Copyright Stephen Bryant 2008