Avatar of Milkybar-kid
Milkybar-kid
 asked on

Reduce Mailbox Database Size Exchange 2010 SP3

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.
ExchangeSBS

Avatar of undefined
Last Comment
Milkybar-kid

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
A Karelin

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Alan Hardisty

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
Milkybar-kid

ASKER
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?
A Karelin

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.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
SOLUTION
Alan Hardisty

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Mohammed Khawaja

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Milkybar-kid

ASKER
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.
Milkybar-kid

ASKER
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.
Milkybar-kid

ASKER
Circular Logging :)
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Mohammed Khawaja

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.
Milkybar-kid

ASKER
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?
Mohammed Khawaja

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
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
SOLUTION
bobluis

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Milkybar-kid

ASKER
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.