Exchage database file size still larger than it should be

Posted on 2011-04-18
Medium Priority
Last Modified: 2012-05-11
Exchange 2007; we have two data stores - one for most of the mailboxes, and one for the 'management' (two mailboxes).  There was 14GB in those 2 mailboxes, but i recently cleaned them all out (each mailbox, according to outlook 'folder size' is under 10MB), but the mailbox database .EDB is stil showing up as being 14.x GB...

i've tried running a 'normal' backup with windows backup, and it didn't shrink after the backup.  also mailbox retention for the database is '0' (which i believe is that it doesn't keep any items after deleted).

What can i do to shrink it?  Those 2 mailboxes are only a total of MAYBE 20MB in size, definitely not the 14.x GB they used to be...
Question by:Mystical_Ice
  • 2
  • 2
  • 2
  • +1
LVL 12

Accepted Solution

serchlop earned 800 total points
ID: 35419058
You need to make a offline defrag for the databases that you want to shrink.

Here is a MS Doc, you have to use eseutil /d, but before make a full backup from your server and a backup for your information stores.

LVL 12

Expert Comment

ID: 35419077
Here is another post with the same issue.



alanhardisty says:

With Exchange 2007 there is no point doing an offline defrag, which simply removes any 'White Space' that might be available.

All you need to do is to move mailboxes from one Database to another and this will achieve the same results as running an Offline Defrag, but without the massive downtime for ALL users within the database.

If you have not maxed out on Databases, then create a new one and move users to the new database, then if empty, delete the old database.

Assisted Solution

Share-IT earned 400 total points
ID: 35419080
Exchange databases dont shrink. They only grow. When you cleaned them out there will be "White space" in the database that can now be re-used so your database will not grow now until all of that white space is used up again.

If you really did want to shrink the DB you will need to do an offline defrag but it means taking your stores offline whilst the defrag takes place (could be hours) and in my experience, i can be hit and miss as to whether it will actually work afterwards.

If you are not struggling for the space, i'f leave it be.
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!


Assisted Solution

jbvernej earned 400 total points
ID: 35419104
Exchange EDB files DON'T SHRINK automaticaly and CANNOT BE SHRINKED online.

Many ways, but the recommended one:
 You must do an 'offline' (planned) maintenance to recover space on disk: 'Exchange offline defragmentation'   - different from hdd defrag -

1- Dismount the database  - all users will disconnected
2- run the ESEUTIL.EXE /D  command to defragment offline the EDB file.
This tool moves data to a new EDB file, after space and size optimization  ( you need free space on the disk to recreate a new edb file after defragmented - max 120 % of original edb file needed)
3- Mount  the database in Exchange and it's done

see http://support.microsoft.com/kb/328804/en-us for details (works fine on Exchange 2007)

Expert Comment

ID: 35419143
The backup will truncate your log files only not the main DB.

A backup will perform a full backup of the database and the delete ALL of the commited transaction logs. but the DB will remain at the same size.

the behaviour is perfectly normal and i stated earlier - leave it be.
LVL 17

Assisted Solution

lucid8 earned 400 total points
ID: 35424440
If the mailboxes are truly only taking up 20MB or so and the physical structure is 14GB as you say then your best move if you really want to reclaim that space is to \

A. create a new database
B. move the mailboxes from the old into the new database
C. Adjust your backup process to protect the new databases.
D. Take the old databases offline (Just to ensure all is well  before taking the next step)
E. When you are sure all is well, remove the old databases from the Exchange Management Console and delete the physical database files
LVL 17

Expert Comment

ID: 35460255
Thanks for the points

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Steps to fix “Unable to mount database. (hr=0x80004005, ec=1108)”.
Steps to fix error: “Couldn’t mount the database that you specified. Specified database: HU-DB; Error code: An Active Manager operation fail”
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question