Exchange 2003 2007 

Exchange Articles, News and Discussions
Welcome to Exchange 2003 2007  Sign in | Join | Help
in Search

Eseutil - A Quick and Easy Tutorial


Eseutil some feel comfortable with this tool others don't; Eseutil should not be taken lightly, some modes of Eseutil that can reak havock if not used in the correct situation or with the correct procedure, which is why I am outlining some simple rules and steps, so that you can use Eseutil without fear and know exactly how it use it in a certain situation.

Eseutil is used in the majority of situations when you experience issues with your Exchange Information Store not starting or misbehaving but there are some senarios were this migh not be the case as you will see in the first example of the switch Eseutil /d below:

Firstly let's look at the what this tool does, Eseutil.exe can be used to  analyze/verify and then modify/repair  your exchange Information Store database files, these files in a default setup are named priv1.edb priv1.stm pub1.edb pub1.stm. It should be noted now with the release of Exchange 2007 (only with the Exchange 2007 version of the tool) eseutil can be used to perform these tasks against the ESE database files on the Exchange 2007 Edge Transport and  Hub Transport servers along with the mailbox and public folder stores.

So now that you know what eseutil does I am now going to outline the switches that Eseutil uses and then give an overview of the defragment mode (eseutil /d), I will save the rest of the switches for another article.

Eseutil                 

Defragment                      /d <database name>  [options]
Recovery                             /r <logfile base name> [options]
Integrity                               /g <Database name> [options]
Checksum                           /k <file name> [options]
Repair                                   /p <database name> [options]
File Dump                            /m[mode-modifier] <filename>
Copy File                              /y <Source file> [options]
Restore                                /c [mode-modifier] <path name> [options]

So as you can see there are a few commands/modes to this tool; before using Eseutil I along with Microsoft recommend follow these simple rules and you cannot go wrong:

  • When using Eseutil the information store must be offline
  • You can only run eseutil on one ESE database at a time
  • If using Eseutil on a production database you should first make a copy of any files that you might touch, this includes all .edb .stm as well as transaction log files .log and .chk, put these aside and don't touch them unless you need to get back to the original state, and in this case copy the backup files don't move, so you always have this safety net.
  • If you have a test lap virtual or physical use it, practice and write down each of the steps before performing on a production system.

Eseutil /d   Defragment (Offline Defragmentation)

This switch is equivalent to your disk defragment, but a little different, what eseutil /d does is removes empty pages in the database file and rebuilds its indices. This procedure is commonly known as the offline defragmentation because the information store database is offline when the defragmentation occurs, as opposed to the regular nightly online defragmentation (maintenance) that occurs when the information store is online.

The additional options  for Eseutil /d are as follows:

Note None of these additional options are required

/s<file>   - set streaming file name (default: NONE)
/t<db>     - set temp. database name (default: TEMPDFRG*.EDB)
/f<file>   - set temp. streaming file name (default: TEMPDFRG*.STM)
/i         - do not defragment streaming file
/p         - preserve temporary database (ie. don't instate)
/b<db>     - make backup copy under the specified name
/8         - set 8k database page size (default: auto-detect)
/o         - suppress logo

In general the eseutil.exe /d is used with the default options as below:

eseutil.exe /d "C:\Program Files\Exchsrvr\MDBDATA\priv1.edb" /s "C:\Program Files\Exchsrvr\MDBDATA\priv1.stm"

Figure 1: Running the eseutil /d command

Unless you wanted the temp database created in a different location, with a different name or did not want the original database to be overwritten by the defragmented version of the database.

In general you would not use the eseutil /d switch unless, you have removed/moved a lot of mailboxes from an Exchange database file or there are -1018 errors in your event logs, or you have just performed an Eseutil /p or there has recently been a mail storm.

Personally if I have say moved X% of the mailbox from one database to another database or server, or deleted a significant amount of mailboxes I prefer defragment using the mailbox move method. All you need to do this create a new blank database and move the mailboxes to the new Information store,  this has the advantage of giving you a free defragmented database, and  users are not impacted as much, because you are moving a single mailbox at a time and only that user is impacted during the mailbox move process, whereas with an offline defragmentation, all mailboxes on that information store are offline until, the entire Eseutil /d process completes.

To see how much free space you have in an Exchange Database file/s just check in the event logs and look for recent occurrences of event 1221 or you can run eseutil /ms (with database offline)

When you run eseutil /d you should ensure you have at least 110% of the database files size available in free disk space on volume that the defragmented copy of the database file is being created.

Microsoft does not recommend running Eseutil /d as a regular maintenance practice, as the online maintenance takes care of this. In addition if your Exchange database is not in a consistent state you should not use eseutil /d.

In the next few days I will outline and give tips on each of the other switches or modes of Eseutil.

How did you like this article? Please add any comments or suggestions, I am always willing to answer any questions and love feedback, you might have a great idea that can be added.

Just a quick addition: I have posted the following addition/follow up to this article, please see them here:

Eseutil /P – A Quick and Easy Tutorial
Eseutil /R (Soft Recovery) – A Quick and Simple Tutorial
Published Monday, March 26, 2007 12:34 PM by Ben Hoffman

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

ExchangeIS said:

This article is the second part of my original article titled Eseutil – A quick and easy tutorial, in which I gave readers an overview of the Eseutil tool, some basic guidelines along with a look at Eseutil /d (defrag). In this article I will talk about

March 29, 2007 12:01 PM
 

subject: exchange said:

Microsoft Bows to EU, Makes Comm Protocols Public No More IIS in Exchange 2007 Open Source E-Mail Could

March 31, 2007 4:33 AM
 

Aggrey said:

It's nice. I like the way you have clearly outlined the procedure on how to make effective use of these eseutil and isinteg tools.

April 11, 2007 10:46 PM
 

Jeff Fitz.. said:

Thank you for explaining this difficult topic.

April 17, 2007 7:00 PM
 

ExchangeIS said:

You have been busy and have not had the time to check your backups recently, all of a sudden your all of the Exchange Databases go offline, after some investigation you realise your full backup has not ran for several weeks and the drive that houses these

May 28, 2007 9:51 PM
 

ExchangeIS said:

Exchange 2007 Server Roles – Exchange 2007 has expanded the concept in Exchange 2007 Server of server roles, which further extends the old 2 role front end back end topology, with a new 5 role model.

April 15, 2008 11:03 AM
 

ExchangeIS said:

Exchange 2007 SP1 which was released in November 2007 brings together improvements for Exchange 2007 in the following three main areas: Client Access Improvements, Protection & Availability improvements, Transport Improvements, Mailbox Role Improvements,

April 22, 2008 10:41 AM
 

exchange 2007 tutorial said:

August 2, 2008 10:04 PM
 

Beoweolf said:

This, the proper uses of ESEutil , has in many ways become a 'lost art'. Unfortunately, with the increased default automation within the various evolutionary versions of Exchange being fairly effective, there is less opportunity to justify initiating new admins to its virtues, benefits and dangers.

September 30, 2008 2:58 AM
 

Gjohn said:

nice one...

September 14, 2009 11:53 AM
 

Irfan said:

Can anyone please help to send the steps for Exchange 2007 defragmentation. Do we have to unmount the Database first? Is any risk involve? Please advise.

January 27, 2010 7:00 AM

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

News

About ExchangeIS


<script type="text/javascript" src="http://technorati.com/embed/zmyi3iatks.js"> </script>

ExchangeIS Privacy Policy Powered by Community Server (Commercial Edition), by Telligent Systems