Thursday, December 24, 2015

Windows 2008 server - how to reduce size of Datastore.edb


ANSWER: defrag the database using esentutl.exe




Here's what I did
########################

Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\******>esentutl.exe /?

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

DESCRIPTION:  Database utilities for the Extensible Storage Engine for Microsoft
(R) Windows(R).

MODES OF OPERATION:
      Defragmentation:  ESENTUTL.EXE /d <database name> [options]
             Recovery:  ESENTUTL.EXE /r <logfile base name> [options]
            Integrity:  ESENTUTL.EXE /g <database name> [options]
             Checksum:  ESENTUTL.EXE /k <file name> [options]
               Repair:  ESENTUTL.EXE /p <database name> [options]
            File Dump:  ESENTUTL.EXE /m[mode-modifier] <filename>
            Copy File:  ESENTUTL.EXE /y <source file> [options]

<<<<<  Press a key for more help  >>>>>
D=Defragmentation, R=Recovery, G=inteGrity, K=checKsum,
P=rePair, M=file duMp, Y=copY file
=>


C:\Users\*******>esentutl.exe /d c:\Windows\SoftwareDistribution\DataStore\DataSt
ore.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: TEMPDFRG18844.EDB

                  Defragmentation Status (% complete)

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


Moving 'TEMPDFRG18844.EDB' to 'c:\Windows\SoftwareDistribution\DataStore\DataSto
re.edb'... DONE!


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 402.373 seconds.



No comments:

Post a Comment