Esentutl /defragmentation

 

Applies To: Windows Server 2008, Windows Server 2012, Windows 8

Performs offline compaction of a database.

For examples of how to use this command, see Examples.

Syntax

esentutl /d <database name> [<options>]

Parameters

Parameter

Description

<database name>

The file name of the database to compact.

<options>

You can specify zero or more of the options that are listed below. Separate each option with a space.

/t<database_name>: Sets the temporary database name. The default is tempdfrg*.edb

/p: Preserves the temporary database (does not instate).

/b<database_name>: Makes a backup copy with the name specified.

/2: Sets the database page size to 2k. The default is auto-detect.

/4: Sets the database page size to 4k. The default is auto-detect.

/8: Sets the database page size to 8k. The default is auto-detect.

/16: Sets the database page size to 16k. The default is auto-detect.

/32: Sets the database page size to 32k. The default is auto-detect.

/v: Verbose output.

/o: Suppresses the logo.

Remarks

If instating is disabled (the /p option is specified), the original database is preserved uncompacted, and the temporary database will contain the defragmented version of the database.

Examples

The following command performs compaction of the Active Directory database stored in the default location on the c:/ drive.

esentutl /d c:/windows/ntds/ntds.dit 

Additional references

Command-Line Syntax Key

Esentutl