Solved

Reduce Mailbox Database Size Exchange 2010 SP3

Posted on 2014-12-01
14
2,472 Views
Last Modified: 2014-12-27
I have an SBS2011 server running Exchange 2010 SP3 which has a Mailbox Database that I want to reduce in size. I have removed several old users and their mailbox and active users have deleted a large amount of data from their deleted items. I have set the "Keep deleted items" to 0 days on the Mailbox database from the Limits tab under Organisation Configuration > Mailbox > properties but the mailbox is not shrinking. What do I need to do to shrink the store? I have run a backup.
0
Comment
Question by:Milkybar-kid
  • 6
  • 3
  • 2
  • +2
14 Comments
 
LVL 5

Accepted Solution

by:
A Karelin earned 125 total points
ID: 40475366
A mailbox database will never by default shrink in size, only retain the whitespace and reuse it.
The only way to shrink a database is to run an Offline Defrag and that is not really recommended and running it will cause the mailboxes to be unavailable for the users many many hours. It would be much better to create a second mailbox database and move the mailboxes to that one and drop the first one.
0
 
LVL 76

Expert Comment

by:Alan Hardisty
ID: 40475394
If you do decide to run an offline defrag, you will need 110% of the database size in free disk space to be able to run it happily.

Is space becoming an issue?  If it is, then you might have other issues that need addressing before you worry about Exchange such as WSUS and SQL as they also chew up a ton of space between them on SBS.

Some light reading for you:

http://blogs.technet.com/b/sbs/archive/2010/03/02/recovering-disk-space-on-the-c-drive-in-small-business-server-2008.aspx

https://alanhardisty.wordpress.com/2012/07/12/sbs-2008-2011-disk-space-eaten-up-by-sharepoint-sql-log-files-how-to-reduce-the-log-file-size/

Alan
0
 
LVL 1

Author Comment

by:Milkybar-kid
ID: 40475405
Space generally is not an issue the server is partitioned and WSUS is not actively managing patching. It is being handled by a third party tool. Thank you for the links but I think those areas are managed ok.

There is not enough space on the exchange partition to do it with 10% free space but I could expand the partition to do the offline defrag and then shrink it down again after the defrag finishes. I also have enough space to create a new partition, move the exchange store using the SBS tools and the do the defrag.

I like the idea of creating a new database and moving the users to it because that would cause less disruption but I was just trying find out the impact of this approach on the SBS because I would suspect it will break the SBS tools for storage management? Can a new database be created, users moved to it, then the SBS default database be taken offline, defragged and mailboxes moved back?

Time planning is going to be essential too. At the moment it is still running and a move of the store to a new partition and also an offline defrag are going to have a downtime implication. What would be the defrag and move times for a 300Gb mailbox database as a rough guide?
0
 
LVL 5

Expert Comment

by:A Karelin
ID: 40475420
I like the idea of creating a new database and moving the users to it because that would cause less disruption but I was just trying find out the impact of this approach on the SBS because I would suspect it will break the SBS tools for storage management? Can a new database be created, users moved to it, then the SBS default database be taken offline, defragged and mailboxes moved back?
You can use EMC. You need to create a new database, move mailboxes, unmount and drop the old database. There is no need to defrag the old database and move back mailboxes.
Perhaps it will take some time but will not interruption in service.
0
 
LVL 76

Assisted Solution

by:Alan Hardisty
Alan Hardisty earned 125 total points
ID: 40475428
You can create a new database, move the users into it (which won't affect them until after the move has completed) and then once the primary database is empty, offline defray it to shrink it, then move the users back to the primary database to keep things tidy / happy.

It will take twice as long, but if you can add the extra space and have the time, that's a sensible approach as defragging means downtime for everyone whilst you defrag whereas moving is minimal disruption for all.

Alan
0
 
LVL 24

Assisted Solution

by:Mohammed Khawaja
Mohammed Khawaja earned 125 total points
ID: 40475546
Before you do anything drastic, find out how much whitespace you have in the database by running the following:

Get-MailboxDatabase DATABASENAME -Status | Select-Object Server,Name,AvailableNewMailboxSpace

If you have over 20% free space in the database then you might benefit from defragmenting the database.  As defragmentation require database to be dismounted, your best choice would be to move mailboxes to different DB and then dismount and delete the DB.
0
 
LVL 1

Author Comment

by:Milkybar-kid
ID: 40477973
I decided to go down the move route to a new database on a new partition.
I foolishly left the path to the log files on the system partition and overnight it has generated a large amount of logs on the C: drive.
I have configured to run a backup to see if I can purge the logs for database 2
Will these logs be normal exchange log files? They amount to a greater size than the size of the mailboxes so far moved.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 1

Author Comment

by:Milkybar-kid
ID: 40486454
I have been running the mailbox move to database 2 for about 6 days now. It is running the move ok and there is 300Gb of data to move but the concern is that the logs are building and are not being committed when a windows backup is run. The logs are 136Gb now and I am having to expand the partition where they are stored to accommodate the growth. What are these logs, normal Exchange logs (which they appear to be) or logs for the move? I really need to get the size down.
0
 
LVL 1

Author Comment

by:Milkybar-kid
ID: 40487786
Circular Logging :)
0
 
LVL 24

Expert Comment

by:Mohammed Khawaja
ID: 40488126
Circular logging will do for you, however, the risk is that as logs will be over-written, if something happens, you could only restore to your last good backup.
0
 
LVL 1

Author Comment

by:Milkybar-kid
ID: 40490020
OK so now the move of all mailboxes is complete and everything appears to be running normally. The new mail database is now a manageable size within the constraint of the partition that was available. However before starting this process I had already had to expand the partition for the Exchange store and I want to get it back down to the original size which is achievable but I read that the offline defrag will only reclaim white space and not reduce the size of the file.

So I can dismount and remove the original database and then reduce the partition size back to where I want it to be, create a new database with the same name as the original and move the mailboxes back to the new database.

What effect will this have on a Small Business Server in terms of the Wizards and the ability to move the Exchange store to another partition if required via the console? Will that get broken? If I dismount the original store and rename it, moving it out of the way, and then create another with the same original name and move the mailboxes back will that work within the SBS constraints?
0
 
LVL 24

Expert Comment

by:Mohammed Khawaja
ID: 40490799
There are three ways you could do it where in each case, you need to dismount the empty database, delete it  and resize your drive first:

1.  Use move mailbox feature to move mailboxes to the new database.  Finally you need to dismount and delete the empty database
2.  Use the move the database feature (click on database, from the work tab on the right side of the screen , select move database path and point it to the desired drive)
3.  Dismount the database, copy the *.edb and logs folder to the new location.  Use ADSIEDIT to change as per following and then mount the database.  If all goes well then you could delete the .edb and logs from drives where you copied from:

   msExchEDBFile = x:\folder name\database name.edb
   msExchESEParamLogFilePath = x:\Logs
   msExchESEParamSystemPath = x:\\Logs

   Above we also changed the logs folder also (it is up to you if you need to change the paths for the logs
0
 
LVL 5

Assisted Solution

by:bobluis
bobluis earned 125 total points
ID: 40508729
Usually, Exchange database size increases whether you remove/move one or multiple mailboxes from the database. It will remain show you the same size, even increases with the time. The reason is Exchange doesn't leave the free space as blank after deletion. You need to defragment Exchange database at regular interval to make some space clean even after mailbox creation or removal.

Check steps to defragment database to increase free size in Exchange database http://exchangeserverpro.com/defrag-exchange-2010-mailbox-database/
0
 
LVL 1

Author Closing Comment

by:Milkybar-kid
ID: 40519759
I created a temporary database. Moved all mailboxes to it after pausing to enable circular logging because it was overloading the temporary space with log files. I then took the original store offline and ran an offline defrag. I set the deleted items retention to zero on the temp store. I then moved the mailboxes back to the original store and the free space is now good for the available disk capacity. I am going to implement a third party archiving solution to manage the space going forward but I suspect they will move to Exchange Online in the not too distant future. By moving back to the original store rather than leaving it on the new has kept the SBS Wizards intact. No real need but cleaner in the long run.

This was all achieved with no downtime and from reading the information for all replies so I have split points across all replies because all helped me to achieve a solution. Many thanks to all.
0

Featured Post

Promote certifications in your email signature

Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
exchange, mailbox 4 20
Exchange 2013 sending anonymous spam 2 28
Circular Logging 2 32
Office 365 vs. In-House 4 37
Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
In this video we show how to create a User Mailbox 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 Recipients >> Mailb…
In this video we show how to create an email address policy 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 Mail Flow…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now