ESENTUTL.exe

Extensible Storage Engine utilities.

Syntax
      ESENTUTL /d database_name [options]   Offline compact/defragment of database.
      ESENTUTL /r logfile base_name [options] Recover database.
      ESENTUTL /g database_name [options]   Check database integrity.
      ESENTUTL /k file_name [options]        Checksum.
      ESENTUTL /p database_name [options]   Repair database.
      ESENTUTL /m[mode-modifier] filename    Dump to File.
      ESENTUTL /y source_file [options]       Copy File.

Key

Common options for all modes other than 'Copy File':

   database_name       The file name of the database to compact/Check/Repair.

   /2        Set the database page size to 2k. The default is auto-detect.
   /4        Set the database page size to 4k. The default is auto-detect. 
   /8        Set the database page size to 8k. The default is auto-detect.
   /16       Set the database page size to 16k. The default is auto-detect.
   /32       Set the database page size to 32k. The default is auto-detect.
   /v        Verbose output.
   /o        Suppress the logo.

Compact options:

   /tdatabase_name   Set the temporary database name. The default is tempdfrg*.edb

   /p                Preserve the temporary database (does not instate).
                     The original database will be preserved uncompacted, and the temporary
                     database will contain the defragmented version of the database.

   /bdatabase_name   Make a backup copy with the name specified.

Recover options:

   /l         Location of log files (default: current directory)

   /s path    Location of system files (for example, the checkpoint file)
              (default: current directory)

   /i         Ignore mismatched/missing database attachments

   /t         On successful recovery, truncate log files

   /u [log]   Stop recovery when the Undo phase is reached with the option to stop when
              a certain log generation is recovered. [log] is the log generation number
              and if not specified the replay will go the end of the existing logs.

   /d [path]   Location of database files or current directory if [path] not specified.
               (default: directory originally logged in log files)

   /npath1[:path2}   New location of database file and optional old location if the
                     database file location changed. Can be specified for each database file.
                     If a certain database is not in the list, it will not get recovered.
                     To allow recovery in the original location for all other databases,
                     use n* (not valid with /d switch; not valid with /b switch).

   /a           Allow recovery to lose committed data if database integrity can still be maintained.

   /fname 	 Set prefix to use for name of report files (default: <database>.integ.raw)

Integrity options:

   /tdatabase_name   Set the temporary database name. The default is tempinteg*.edb
   /fname          Set a prefix to use for name of report files (default: database.integ.raw)

Checksum options:

   /tdatabase_name 	 Set the temporary database name. The default is tempchksum*.edb
   /p x 	 Add artificial 1 second pause after every x I/Os (default: no pause)
   /e 	   Do not checksum database file.

Repair options:

   /tdatabase_name   Set the temporary database name. The default is temprepair*.edb
   /f name          Set a prefix to use for the name of report files (default: database.integ.raw)
   /g                Run an integrity check before repairing.

Dump to File options:

   [mode-modifier]   An optional letter designating the type of file dump to perform.
                    Valid values are:
                       h – dump database header (default)
                       k – dump checkpoint file
                       l – dump log file or set of logs
                       m – dump meta-data
                       s – dump space usage

   filename    Name of the file to dump.
              The type of the specified file should match the dump type being requested
              (for example, if using /mh then filename must be the name of the database).

   /cfile     For dump of a single log file only, dump the log file, in CSV format, to file.
   /ppgno   Dump the specified page from the database.
   /t table   Perform dump for specified table only.
   /x       For dump of a single log file only, permits fixup of torn writes at the end of
            the log file if necessary (Note: requires read/write access to the log file)

Copy Options:

   /dfile   Destination file (default: copy source file to current directory)
   /i     Ignore I/O read errors

The Extensible Storage Engine (ESE) was formerly known as the Microsoft Joint Engine Technology (JET) Blue, and so frequently the term "JET Blue" or "JET" is used interchangeably with the term ESE.

The term "JET" is frequently also used to refer to JET Red, which is the database engine that is used with Microsoft Access. The two JET implementations are completely different, are separately maintained, have a vastly different feature set, and are not interchangeable.

Examples

Compact/defragment the Active Directory database stored in the default location on the c: drive:

C:\> esentutl.exe /d c:\windows\ntds\ntds.dit

Stop the Windows Search service and compact/defragment the Windows.edb file offline:

SC config wsearch start=disabled
SC stop wsearch
esentutl /d %ProgramData%\Microsoft\Search\Data\Applications\Windows\Windows.edb
SC config wsearch start=delayed-auto
SC start wsearch

Recover the E02 log file:

C:\> esentutl.exe /r E02

Verify the checksum of the Active Directory database file:

C:\> esentutl /k c:\windows\ntds\ntds.dit

Repair a corrupted Active Directory database in the default location:

C:\> esentutl /p c:\windows\ntds\ntds.dit

Initiate a file dump of metadata for the Active Directory database:

C:\> esentutl /mm c:\windows\ntds\ntds.dit

Copy the Active Directory database in the default location:

C:\> esentutl /y c:\windows\ntds\ntds.dit

Copy the Active Directory database to C:\Backup\dump.dit

C:\> esentutl /y c:\windows\ntds\ntds.dit /dC:\Backup\dump.dit

Copy the source EXE to an Alternate Data Stream (ADS) of the destination file.

C:\> esentutl.exe /y C:\demo\file.exe /d c:\demo\file.txt:file.exe /o

Copy the source Alternate Data Stream (ADS) to the destination EXE:

C:\> esentutl.exe /y C:\demo\file.txt:file.exe /d c:\demo\file.exe /o

Copy a (locked) file using the Volume Shadow Copy:

C:\> esentutl.exe /y /vss c:\windows\ntds\ntds.dit /d c:\demo\ntds.dit

“The impossible often has a kind of integrity to it which the merely improbable lacks” ~ Douglas Adams

Related commands

CHKDSK - Check Disk - check and repair disk problems.
CleanMgr - Automated cleanup of Temp files, recycle bin etc.
Extensible Storage Engine Reference - Developer documentation.
MSDT.exe -ep SystemSettings_Troubleshoot_L2 -id SearchDiagnostic - Search and Indexing Troubleshooter.


 
Copyright © 1999-2024 SS64.com
Some rights reserved