Link to home
Start Free TrialLog in
Avatar of MichaelBalack
MichaelBalackFlag 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.
ASKER CERTIFIED SOLUTION
Avatar of Mal Osborne
Mal Osborne
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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.
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
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.
Avatar of MichaelBalack

ASKER

Hi all,

Thanks for all your prompted suggestions.
Looks like a solution has been provided