How to manually -- and safely purge Exchange Server transaction logs

How to manually -- and safely purge Exchange Server transaction logs

Serdar Yegulalp, Contributor
This tip originally appeared on SearchExchange.com, a sister site of SearchCIO-Midmarket.com.

Exchange Server transaction logs are a key part of the way Exchange backups work. If a transaction log is missing from a backup

    Requires Free Membership to View

    When you register you’ll also receive the latest news, advice and technical tips designed specifically for midmarket IT leaders like yourself. Our award-winning editorial team will give you immediate access to emerging business and technology trends.

    Scot Petersen, Editorial Director, SearchCIO-Midmarket

    By submitting your registration information to SearchCIO-MidMarket.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchCIO-MidMarket.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

set, or not available in an online backup, the Exchange restore operation will not be able to complete.

Since Exchange transaction logs can eat up a lot of disk space though, administrators often wonder if it's possible to selectively delete transaction logs that are no longer needed for Exchange restore operations.

One option that can reduce the amount of space used by Exchange transaction logs is circular logging, where the oldest logs are eventually overwritten as they're phased out. Unfortunately, circular logging makes it impossible to run incremental backups and differential backups on Exchange Server stores using an Exchange-aware backup product, so it's impractical for many shops.

Another possibility is to judiciously remove unneeded Exchange transaction logs. Although Microsoft doesn't recommend it, there is a way to find out manually which transaction logs are no longer needed by determining the last checkpoint created by an Exchange Server backup.

To do this from a command line, go to the \Program Files\Exchsvr\bin directory on the server and run the following command:

eseutil /mk "C:\Program Files\Exchsrvr\MDBDATA\E00.chk"

(The quotes are important, as they delimit the full pathname for the file.)

In the results returned you'll see these lines:

LastFullBackupCheckpoint: (0x0,0,0)
Checkpoint: (0x2,EC2,1C7)

The first number in the "Checkpoint" entry -- 0x2 -- is a hexadecimal number that refers to the last checkpoint log. Therefore, any logs numbered E000001.log or earlier could be removed. If the checkpoint was 0x14C8, then logs numbered E0014C7.log or earlier could be removed.

If you're leery about erasing Exchange transaction logs completely, you can always compress them and move them offline instead.

Serdar Yegulalp is editor of the Windows Power Users Newsletter. Let us know what you think about this tip; email editor@searchcio-midmarket.com.


This was first published in May 2006

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.