Avatar of MichaelBalack
MichaelBalack
Flag for Singapore asked on

How to shrink exchange database size without downtime?

This is using MS Exchange 2010 with SP3. There are 3 Exchange servers holding mailbox and hub transport roles. These 3 exchange servers are in DAG. A mailbox database was found growing with size of nearly 600 GB. 200+ mailboxes were housed in it. However, we removed 40+ mailboxes, and we going to remove up to 60 mailboxes in 3 months' time. However, as expected, the db size not reduced.

I know that in order to reduce the size, we have to dismount the db, and then use microsoft tool - eseutil to "purge away"the white spaces. This method is called offline defrag and it may takes days to complete the operations.

Is there any alternative way to defrag (online or so) and reduce the db size without or with minimal downtime?

Thanks in advance.
Exchange

Avatar of undefined
Last Comment
Mal Osborne

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Mal Osborne

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
Alan Cox

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
PRADIIP SINGH

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.
Dinesh Babu

Hi,
I would suggest you to follow the below sequences,
1. Get Databases wise mailbox size report and sort it (bigone first), you can use the below cmdlet to get the reports.
   
Get-MailboxDatabase -identity "MDB01" | Get-MailboxStatistics | sort -property totalitemsize | ft displayname,totalitemsize | export-csv "file.csv"

Open in new window

2. Identify top mailboxes (active and growing) in the growing database, move some top mailboxes to other DB's(balanced) using below cmdlet
   
New-MoveRequest -Identity "growing_mx"  -TargetDatabase "other_db"  -baditemlimit 100

Open in new window

Now you have enough time so create new database. Then move mailboxes batch wise to newly created mailbox database using below cmdlet,
Get-Mailbox -Database "gowing DB" | New-MoveRequest -TargetDatabase "new DB"  -BatchName "growing to new" -SuspendWhenReadyToComplete

Open in new window


Thanks
Todd Nelson

It is not possible to perform a "online" defrag of Exchange databases.  If you have space, as mentioned a couple of times above, create a new database, move the mailboxes to the new database, and finally remove the old database.

In fact, Microsoft no longer recommends the use of ESEUTIL unless there is a situation that requires a repair of the database.  Additionally, the stated mailbox moves is the recommended method to "defrag" or shrink a database.  Seems like a lot of work but it is the best method--provided you have disk space available to do so.
Amit

First post is the right and best answer for your query. Just to add, use my article to remove old db:
https://www.experts-exchange.com/articles/12324/How-to-Remove-First-or-Default-Exchange-2010-Database.html
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Tim Edwards

As stated above no online defrag.

When I run into this issue, I create to new mailboxes and move the users over off peak hours. Once the users have been moved, I wait until delete item retention policy has passed the 30 days since the last mailbox was moved.

Once that is created I do not defrag but delete the old database, this allows me to keep smaller databases for maintenance and recovery.
MichaelBalack

ASKER
Hi all,

Thanks for all your prompted suggestions.
Mal Osborne

Looks like a solution has been provided
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.