Tuesday, May 1, 2007

Defragmenting a database with ESEUTIL and ISINTEG

Defragmenting a database requires free disk space equal to 110 Percent of the size of the database that you want to process. The repair runs at approximately 4 to 6 gigabytes (GB) per hour 50-GB database requires approximately 8 hours for repair and approximately 8 hours for the ISinteg process, for a total of 16 hours. These estimates may, or will change depending upon your hardware specification.

Eseutil /d Offline defragmentation creates a new physical database structure and moves the existing data to that structure.

Check the consistency of the database by using ISinteg -fix. You may need to run ISinteg several times until the summary report returns no errors. Have a good backup, Dismount Store, now go to this Directory (assuming you have installed Exchange in C :\) From DOS

Assuming you have checked the event ID 1221 on your exchange server and determine how much White space can be recovered. Remember, It is only recommended if at least 30% of the space taken by the database will be recovered (Event ID 1221 in the application log after an online defragmentation will give a conservative estimate as to how much free space is in the database).

c:\program files\exchsrvr\mdbdata\priv1.edb

Eseutil /d "c:\program files\exchsrvr\mdbdata\priv1.edb "

ESEUTIL is the Exchange server database utility, below are some common used switches


/d Offline defragmentation (/d).


/g Integrity (/g).


/m File dump (/m).


/y Copy file (/y).


/p hard repair on the database



Description of the ISinteg utility (http://support.microsoft.com/kb/182081/)

How to defragment with the Eseutil utility (Eseutil.exe)

Ramifications of running the Eseutil /p or Eseutil /d /r command in Exchange

Using the Exchange tools ISINTEG and ESEUTIL

Because of the potential to cause damage with ESEUTIL, operations should normally be performed with restored data on a non-production server. Offline defragmentation may be necessary if a large number of mailboxes have been deleted (e.g. following a migration, or if there is a high staff turnover), or following a hard database repair (ESEUTIL /p).

Event id 1221 is the Interview question asked by Microsoft (- : (at least one time )Unless a temporary path is specified as an option, offline defragmentation requires free disk space of at least 110% of the database size to be available as well as the streaming database to reside on the same path. An integrity check may be necessary to perform a dry run of the repair function - i.e. to validate the checksum for each 4Kb page in the database. Problems that a repair would address are written to a database. Integ.raw file which logs all pages in the database, not just those with problems.

An integrity check may abort prematurely if problems are of such a nature that a repair is required before some parts of the database can be checked but this does not necessarily mean that a repair would fail. Unless options are specified, an integrity check requires 20% free space.

A file dump allows the viewing of the header information for database, streaming database, checkpoint, online backup patch or transaction log files. The header information can be used to validate that a series of transaction log files forms a matched set and that all files are undamaged, to view space allocation inside the databases, or to view metadata for one or more tables within the database file. An example use of this would be to read the state of an unmounted store (i.e. clean or dirty), to provide some diagnosis as to why the store stopped, prior to mounting the store (which would attempt a soft recovery).

If a database repair is required, this is a last resort, which will strip out orphaned database pages, possibly resulting in data loss. Multiple runs may be required until the entire database is repaired.A copy file operation simply provides a quick method of copying databases between servers.

ISINTEG is a utility to search an offline information store for integrity weaknesses. Unlike ESEUTIL (which focuses on the physical database), ISINTEG is concerned with the logical structure. It has two modes:

•    Default mode - in which the tool runs the specified tests and reports its findings

•    Fix mode - where options are specified to run tests and attempt a fix where possible.

For maintenance work, default mode is used. Unless addressing a particular issue in the database, the all tests option is typically the most effective course to follow.In order to run ISINTEG, the Microsoft Exchange Information Store service must be started but the database to be checked dismounted. ISINTEG can be run against remote servers, but not against raw database files or backups.


Oz Ozugurlu

No comments: