Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


August 2002

Eseutil: Handle with Care


RSS
Subscribe to Windows IT Pro | See More Database Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

The typically unnecessary mode. The mode I get the most questions about is the defragmentation mode (i.e., the /d switch). Using this mode to defragment your Exchange database might seem like a good way to recover significant amounts of disk space—but it isn't. Exchange already performs an online defragmentation as part of its nightly database maintenance tasks. Eseutil's offline defragmentation doesn't recover any space from the .edb file—it just rearranges the pages. (To confuse the issue, Exchange 2000 recovers .stm file space during an online defragmentation because the data is organized in contiguous chunks in the .stm file but is all over the place in the .edb file.)

When Exchange needs more space, it uses the free space inside the database file before using more space from the disk. Thus, you don't need to perform an offline defragmentation unless you desperately need the disk space or you've done something to dramatically reduce the amount of space the database uses, such as moving numerous mailboxes or putting many attachments into a Hierarchical Storage Management (HSM) system. For example, if you shrink your 30GB database down to 5GB of data, you can run an offline defragmentation to reclaim that 25GB of disk space. However, doing so is pointless if your IS will just end up growing back to its original size, unless you're trying to reduce the amount of time your backups take.

In those rare cases when performing an offline defragmentation is desirable, you must take the database offline, which means stopping the entire IS in Exchange 5.5. In Exchange 2000, you can just dismount the target database. When you use Eseutil with the /d switch, Eseutil copies the old database to a temporary file, page by page. When the defragmentation finishes, Eseutil replaces the old database with the new database. This approach is quite safe because Eseutil doesn't delete the original database until the copy operation successfully finishes.

Although the defragmentation mode is safe, it requires a lot of free disk space and time to run. The Microsoft article "XADM: How to Defragment with the Eseutil Utility (Eseutil.exe)" (http://support.microsoft.com/default.aspx?scid=kb;enus;q192185), states that you must have free disk space equal to 110 percent of the size of the database you're defragmenting. For example, to defragment a 60GB database, you need 66GB of free space on the server. Although Eseutil's /t switch lets you specify an alternative location (e.g., a network disk) for the temporary database file, be prepared for an extremely long wait—defragmentation is an I/O-intensive operation.

The most important modes. The modes I've talked about so far are helpful to have, but what makes Eseutil indispensable is its ability to fix a corrupt database. Eseutil has three modes—recovery, repair, and restore—that are useful in this context.

The recovery mode (i.e., the /r switch) tells Eseutil to play back any uncommitted transactions to bring the database to a consistent state. Although this mode makes the database consistent, it makes no attempt to repair any internal damage. Thus, if the database has any corrupt pages, Eseutil won't fix them.

For the recovery mode to work, you must have a good backup of your transaction logs. Note that the store performs a similar task when you start it: The store examines the checkpoint file to see which transaction logs haven't been committed yet, then plays through them. (Tip: Did you know that you can run Eseutil to recover an Exchange database on a computer that doesn't have Exchange installed? You need to copy eseutil.exe and a handful of DLLs to the target machine. The Microsoft article "XADM: How to Run Eseutil on a Computer Without Exchange Server" at http://support.microsoft.com/default.aspx?scid=kb;en-us;q244525 explains in detail what to do.)

The repair mode (i.e., the /p switch) repairs corrupt pages but makes no attempt to put the database in a consistent state. Thus, for Exchange 5.5, I recommend that you don't run Eseutil with the /p switch until after you've run Eseutil with the /r switch. Exchange 2000 lets you use Eseutil with the /p /g switch combination. If you use this combination, Eseutil checks the database for consistency, then prompts you to begin the repair process.

Remember that in Exchange 2000, each .edb file has an associated .stm file. Thus, the repair mode has separate subswitches you can use if you don't have the .stm file for a particular database or if you have a pair of .stm and .edb files whose signatures don't match. See the Eseutil documentation or online Help for details about when and how to use these subswitches. To access the online Help, type the command

eseutil /?

then choose the g or r option.

Be aware that the repair mode might truncate or modify corrupt pages to fix the database. Because these actions might result in data loss, I recommend that you determine which pages you might lose when using this mode. See the Microsoft article "XADM: How to Determine Which Mailbox Owns a Particular Page in a Database" for step-by-step instructions about how to make this determination. In addition, you might want to make a copy of your database and run the repair mode on that copy. That way, you can restore the damaged database in case Eseutil makes the database worse. However, be aware that following the article's instructions might take a long time because you must make a separate pass to check the database.

Only the Exchange 2000 version of Eseutil offers the restore mode (i.e., the /c switch). When you restore an Exchange 5.5 database from an online backup and start the IS process, IS automatically replays any pending transactions and performs several recovery steps to get the database back to usable form. Exchange 2000's store doesn't perform these tasks in case you want to restore a database without immediately mounting it. The store performs these tasks only when you select the Last Backup Set check box in the Windows 2000 Backup utility. (Click Start Restore on the Restore tab to access this check box.) This new process means that you need to select that check box as you start to restore the last backup set for your Exchange server. If you forget, you can initiate the recovery manually by using Eseutil's /c switch with the c option (i.e., /cc). For information about how to use this switch, see the Microsoft article "XADM: The 'Last Backup Set' Check Box and Hard Recovery in Exchange 2000" (http://support.microsoft.com/default.aspx?scid=kb;en-us;q232938).

Use but Use Wisely
Eseutil can be a great laborsaving tool when your Exchange database has problems, but using this tool can lead to disaster if you're careless. Keeping good backups and practicing recovery on a test server will help reduce the risk that you'll use the tool inappropriately. Understanding when to use Eseutil and what each mode does will help you keep your Exchange data where your users need it: mounted and on the server.

End of Article

   Previous  1  [2]  Next  


Reader Comments
Hi and Help

I'm having problems restoring the IS and DS to a server on a private network running Exchange 5.5 service pack 4. The private network simulates EXACTLY the setup from which the restorable IS/DS had been backed up (incidentally via Veritas' BE version 7.3).Naturally I can't restore to the live system and further I'm only trying to recover a few deleted mailboxes!!. Needless to add the IS/DS restore runs without error. I can see the appropriate PRIV & PUB edb's plus the host of edbxxxxxx type files.

The problem arises when running up the IS/DS. Initially the DS gave error 1067 and failed but applying the workround suggested in Base Article 247769 corrected that particular problem and DS starts ok.!!

However running up the IS fails with error 1053 but I can't find any Base Articles although I've traced that particular error to ESE97 problems viz

-1053 0xFFFFFBE3 JET_errNullKeyDisallowed Null keys are disallowed on index 4294966243


I've reluctantly, as you advise, avoided using ESEUTIL yet, in any form, but feel I'm going to have to bite the bullet!
I'm not too concerned about screwing Exchange up as I've rebuilt it and then restored it a number of times already, but I realise I'm badly in need of some divine intervention or perhaps the advice of an expert such as yourself.

Any polite and constructive advice will be graciously and thankfully received.
May I add I'm becoming pretty desperate!

Regards all,



Mike Llewellyn April 20, 2004


Use Powercontrols from Ontrack. Allows you to open the priv.edb file and manually copy whatever you want from it to either a PST or another priv.edb. I shouldnt have wasted our companys cash on Backupexecs exchange license all you need is this program and the priv.edb file. Obviously the pub.edb would help, but not compulsorary.

Chris Reynolds June 11, 2004


Compulsorary?

Anonymous User December 30, 2004


It's a word man! See the George Bush English dictionary.

Anonymous User January 08, 2005


Well written. Warnings of using eseutil was good idea.

Anonymous User May 05, 2005 (Article Rating: )


You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Understanding File-Size Limits on NTFS and FAT

A general confusion about files sizes on FAT seems to stem from FAT32's file-size limit of 4GB and partition-size limit of 2TB. ...


Exchange Server and Outlook Whitepapers Take Control of Your Email: Understand the Business Reasons for Email Storage Management

Continuous Data Protection and Recovery for Microsoft Exchange

Related Events WinConnections and Microsoft® Exchange Connections

Check out our list of Free Email Newsletters!

Exchange Server and Outlook eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

The Expert's Guide for Exchange 2003: Preparing for, Moving to, and Supporting Exchange Server 2003

Related Exchange Server and Outlook Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format

Exchange & Outlook UPDATE eNewsletter
News, strategies, products, and developments in Exchange Server and Outlook messaging.

Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement