How to perform an offline defrag of the Health Service Store



Periodically, the Health Service Store may become badly fragmented. There is a rule in SCOM that performs a daily defrag of this database file, but it’s an online defrag and doesn’t always do the trick if there are frequent instance space changes occurring.

Performing the Defrag

On the Root Management Server, perform the following steps.

1. Open command propmpt and navigate to “%Program Files%\System Center Operations Manager 2007\Health Service state\health service store“.

2. Type net stop HealthService

a. If service does not shutdown clean, see recoverybelow before continuing.

3. Type esentutl /d HealthServiceStore.edb

4. Type net start HealthService


If Health Service incurs a dirty shutdown, replay transaction log before continuing with defragmentation.

1. Type esentutl /r <HealthServiceStoreFile>.edb

a. If recovery doesn’t work, try esentutl /p <HealthServiceStoreFile>.edb

2. Continue with step 3 above

Comments welcome (links require moderation)