Monday 23 February 2015

Windows Vista - how to reduce size of Datastore.edb

ANSWER: defrag the database using esentutl.exe

Here's what I did

C:\Windows\system32>esentutl /d C:\Windows\SoftwareDistribution\DataStore\DataStore.edb

Extensible Storage Engine Utilities for Microsoft(R) Windows(R)
Version 6.0
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating DEFRAGMENTATION mode...
            Database: C:\Windows\SoftwareDistribution\DataStore\DataStore.edb
      Temp. Database: TEMPDFRG4872.EDB

                  Defragmentation Status (% complete)

          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ...................................................


Moving 'TEMPDFRG4872.EDB' to 'C:\Windows\SoftwareDistribution\DataStore\DataStore.edb'..

Note:
  It is recommended that you immediately perform a full backup
  of this database. If you restore a backup made before the
  defragmentation, the database will be rolled back to the state
  it was in at the time of that backup.

Operation completed successfully in 27.875 seconds.

Now i have an extra 400MB free - makes the difference on vista!