Home > Microsoft Exchange Tips > Exchange Server Administration Tips > Clearing the confusion around Exchange Server circular logging
Exchange Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

EXCHANGE SERVER ADMINISTRATION TIPS

Clearing the confusion around Exchange Server circular logging


Brien M. Posey
03.08.2006
Rating: -4.67- (out of 5)


Exchange Server tips, tutorials and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


An issue that commonly confuses new Exchange Server administrators is circular logging. Because Microsoft's circular logging recommendations have changed over the years based on Exchange Server version changes, there is a lot
VIEW MEMBER FEEDACK TO THIS EXCHANGE SERVER TIP
of contradictory information out there on the topic. In this article, I explain what circular logging is and the pros and cons of using it.

A crash course in Exchange transaction logs

Before you can understand circular logging, you need to know what transaction logs are and how Exchange Server uses them. Information that needs to be added to a mailbox database is first written to an Exchange transaction log. The contents of that transaction log are later written to the Exchange Server database.

Exchange Server writes data to transaction logs first for a couple of reasons. First, it's more efficient to write data to a transaction log than wait for database activity to stop so a change can be written directly to the database.

Primarily, though, transaction logs are used as part of the Exchange Server backup process. Volume Shadow Copy Services aside, you can't back up an open file. If data were written directly to the Exchange database, you would have to close the database before you could back it up, which means it would be unavailable to users during that period of time.

Microsoft chose to use the transaction log model, so users can still access Exchange Server during a backup. The data is simply written to the transaction logs rather than to the Exchange database. When the database is backed up, the transaction logs are backed up as well and their contents committed to the database.

Normally, after a backup completes, Exchange transaction logs accumulate until the next backup. If you have to restore the database, those accumulated transaction logs can be used to bring Exchange Server database back to a current state.

The mechanics of circular logging

Circular logging was introduced in a much earlier version of Exchange Server as a method for conserving disk space. It prevents Exchange transaction logs from filling up your hard disk by limiting the maximum number of transaction logs in use at any given time.

In most cases, only four transaction logs will be used at a time. Since transaction logs are 5 MB in size, they will consume 20 MB of disk space if circular logging is enabled. Once the fourth transaction log fills up, Exchange Server makes sure that the first transaction log created has been flushed, and then replaces it with an empty log file that will store the next set of transactions.

For example, Exchange will initially create the following log files: E0000001.LOG, E0000002.LOG, E0000003.LOG, and E0000004.LOG. Exchange Server will fill up E0000001.LOG first before moving on to E0000002.LOG. When E0000004.LOG is full, the E0000001.LOG file is erased and replaced with E0000005.LOG.

Advantages and disadvantages of circular logging

Circular logging's main drawback is that it affects the ability to back up and restore data.
More on Exchange Server monitoring and logging:
Structuring Exchange Server for the best log file protection

Move your Exchange transaction logs for faster performance

Backing up, truncating and cleaning up Exchange transaction logs

Exchange Server Monitoring and Logging Reference Center

When enabled, you can only perform full backups of the Exchange database. You cannot perform incremental or differential backups.

Furthermore, if you ever have to restore a backup, you will almost always lose any data that has been added to the server since the backup was made, because of the limited amount of data that is stored in the transaction logs when circular logging is enabled.

You might be wondering why Microsoft would create a feature that limits the ability to recover from a disaster. As I explained earlier, circular logging is left over from an ancient version of Exchange Server. Today, hard disks tend to be massive, so it makes no sense to use circular logging unless your server is running extremely low on hard disk space.

How to enable or disable circular logging

Clearly, circular logging on an Exchange 2003 server is almost always a bad idea. As such, it is disabled by default. But if you want to verify that it is disabled, open Exchange System Manager and navigate through the console tree to Administrative Groups -> your administrative group -> Servers -> your server -> the storage group you want to check. Right click on the storage group, select Properties, and verify that the "Enable Circular Logging" checkbox is not selected.

About the author: About the author: Brien M. Posey, MCSE, is a Microsoft Most Valuable Professional for his work with Exchange Server, and has previously received Microsoft's MVP award for Windows Server and Internet Information Server (IIS). Brien has served as CIO for a nationwide chain of hospitals and was once responsible for the Department of Information Management at Fort Knox. As a freelance technical writer, Brien has written for Microsoft, TechTarget, CNET, ZDNet, MSD2D, Relevant Technologies and other technology companies. You can visit Brien's personal Web site at www.brienposey.com.

MEMBER FEEDBACK TO THIS EXCHANGE SERVER TIP

It didn't seem like you pointed out the advantages of circular logging at all. Enabling it completely removes the threat of filling up a disk with transaction logs. For servers that perform bridgehead type functions and do not store any mail so-to-speak, it's often the case that a database would not have to be restored in a disaster situation (create a new one and you're up). If there's no need to restore a database, circular logging becomes more desirable.
—Pat P.

******************************************

Granted, circular logging does have its place. If there were never a need for circular logging, Microsoft would not have created it in the first place. When I wrote the article, I did so under the assumption that the server in question would be hosting mailboxes and/or public folders, would have plenty of disk space, and would be backed up regularly.
—Brien Posey, tip author

******************************************

Great article!

Is it also a good practice to enable circular logging if you have deployed a front-end server that doesn't contain any mailboxes?
—Ted O.

******************************************

Front-end servers do not contain databases, and therefore there is no need to enable or disable circular logging.
—Brien Posey, tip author

******************************************

What about using circular logging on front-end Outlook Web Access (OWA) servers in a DMZ?

Since there is no user data on the front-end server in this scenario, you could question the need to run an Exchange aware backup on these servers. They are not the first servers in the site and they don't have any databases, so recovery of these servers is much simpler. OWA servers don't need the same beefy disk requirements as the back-end Exchange servers, therefore, circular logging makes sense in this scenario. It's an economy of scale: mirrored drives, Exchange Standard Edition, low backup expense.
—Dave C.

******************************************

This is a perfectly valid point. Again though, I wrote the article under the assumption that the server in question contained databases filled with mailboxes or public folders.
—Brien Posey, tip author

******************************************

On Exchange 2003 SBS, cicular logging IS enabled by default.
—Brett F.

******************************************

Yes, circular logging is enabled by default in SBS.
—Brien Posey, tip author

******************************************

What if you are using an email archiving solution? Turning on circular logging in this case seems to be recommended.

Also, I am considering using a system snapshot solution on Exchange servers that will "snapshot" the disk at a given time -- including open files -- but won't purge transaction logs.

Is there a way to configure circular logging to use a certain amount of disk space (e.g., 1 GB or similar) and once reaching that limit to circle?
—Andy O.

******************************************

Microsoft has gone back and forth several times over the years recommending that admins use or not use circular logging. I believe that the current recommendation is still not to use circular logging, even with email archiving (but I'm not positive). If there is information to the contrary, then you should certainly use Microsoft's recommendations.

As for automatically purging log files at a certain point... no, it just doesn't work that way.
—Brien Posey, tip author

Do you have comments on this tip? Let us know.

Please let others know how useful this tip was via the rating scale below. Do you know a helpful Exchange Server, Microsoft Outlook or SharePoint tip, timesaver or workaround? Email the editors to talk about writing for SearchExchange.com.

Rate this Tip
To rate tips, you must be a member of SearchExchange.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Microsoft Exchange Server Transaction Log Files
Can a deleted transaction log be restored in Exchange Server 2003?
Why are Exchange Server MDBDATA log files important?
Automating Exchange Server 2003 log file cleanup
Tame your Exchange Server transaction logs
Exchange Server Standard Maintenance Checklist
How to move Exchange Server transaction logs and databases to a new hard drive
How to manually (and safely) purge Exchange Server transaction logs
Ease the pain of Exchange recovery with SLAs and RSGs
Still receiving inbound SMTP e-mail at a defunct domain
Structuring Exchange Server for the best log file protection

Microsoft Exchange Server 2003
Repairing damaged OWA virtual directories in Exchange Server 2003
Configure a mobile device to receive POP3 email from Exchange Server
Customizing an Outlook Web Access 2003 email signature
Why Exchange ActiveSync fails with NAT firewalls
Is it time to upgrade users' Windows Mobile devices?
Top 10 Microsoft Exchange Server 2003 registry hacks
Use Performance Monitor to detect Exchange 2003 message queue problems
How to set up email disclaimers on a single, back-end Exchange server
How to customize OWA authentication logon in Exchange Server 2003
Can a deleted transaction log be restored in Exchange Server 2003?
Microsoft Exchange Server 2003 Research

Microsoft Exchange Server Database Management
Why boot an Exchange server from a storage area network (SAN)?
DetachPipe: Outlook add-in tool saves and restores email attachments
How to calculate white space in an Exchange streaming (.STM) file
An affordable Exchange Server database backup software option for SMBs
Solve server problems with the Exchange Troubleshooting Assistant tool
iSCSI SAN storage for Microsoft Exchange -- 5 tips in 5 minutes
Is an Exchange 2003 offline defrag needed prior to moving databases?
How to move Exchange Server email folders to another disk on the same computer
Should you use NTFS compression on Exchange Server files?
Tame your Exchange Server transaction logs

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2004 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts