The Extensible Storage Engine API(ESENT) is a high-performance desktop database engine that is used by many applications, including Windows Update. Certain storage drivers have different kinds of support for querying the physical sector size of the hard disk in a hard disk drive and, when such a driver is upgraded, the reported physical sector size of the hard disk can change. Because of the logging structure of ESENT, applications that are built on ESENT receive an error message and stop responding when the reported physical sector size changes between operating system sessions.
Note Applications that are built on ESENT include Windows Update, Active Directory, Windows Desktop Search, certification authority (CA), WINS, DHCP, and Windows Live Mail.
You receive the following error message when you click the Check for Updates button on Windows Update site:
Windows Update cannot currently check for updates because the service is not running. You may have to restart your computer.
Additionally, the following error is logged into the Application log:
Log Name: Application
Source: ESENT
Date: <Date Time>
Event ID: 412
Task Category: Logging/Recovery
Level: Error
Keywords: Classic
Description: wuaueng.dll (936) SUS20ClientDataStore: Unable to read the header of logfile C:\Windows\SoftwareDistribution\DataStore\Logs\edb.log. Error -546.
An updated Esent.sys binary that eases the effects of changes in the reported sector size is included with this hotfix.
Note Esent.sys does not support physical sector sizes other than 512 bytes and 4 KB.
Database repair
To repair the database, follow these steps:
- At a command prompt, type the following commands. Press Enter after you type each command.
- net stop "windows update"
- cd /d %windir%\SoftwareDistribution\DataStore\Logs
- esentutl /mh ..\DataStore.edb | findstr /i /c:"State:"
Note If "State: Clean Shutdown" is displayed in the command-line, go to step 5.
- Create a temporary folder (for example, create a folder that is named "Fixedfiles" by using the mkdir c:\fixedfiles command).
Note During the following steps, replace "c:\fixedfiles" with the folder that you created in this step.
- Obtain a copy of the %windir%\system32\esent.dll file from a computer that has this hotfix installed, and copy the file to c:\fixedfiles.
- At a command prompt, type the following commands. Press Enter after you type each command.
- copy %windir%\system32\esentutl.exe c:\fixedfiles\
- c:\fixedfiles\esentutl.exe /r edb
- esentutl /mh ..\datastore.edb | findstr /i /c:"State:"
Notes
- If "State: Clean Shutdown" is displayed in the command-line, go to step 5.
- If this step fails or if "State: Clean Shutdown" is not displayed in the command-line, see the "Destructive recovery method" section of this article.
- Create a temporary folder (for example, create a folder that is named "Backuplogs" by using the mkdir c:\backuplogs command).
Note During the following steps, replace "c:\backuplogs" with the folder that you created in this step.
- At a command prompt, type the following commands. Press Enter after you type each command.
- move * c:\backuplogs
- net start "windows update"
- Run Windows Update.
Destructive recovery method
Important If you use this method, you will lose your Windows Update history. Therefore, we do not recommend that you use this method unless you cannot repair the database. To use the destructive recovery method, follow these steps:
- At a command prompt, type the following commands. Press Enter after you type each command.
- net stop "windows update"
- cd /d windir%\SoftwareDistribution\DataStore
- rmdir /s/q Logs
- del DataStore.mdb
- net start "windows update"
- Run Windows Update.