Shrink Exchange Databases

zito2000
zito2000 used Ask the Experts™
on
Environment: Exchange 2013

I am looking for the PowerShell command to determine how much whitespace is in an Exchange 2013 database.  I'm also wondering what the steps are to get the whitespace back.  If I recall correctly, I have to:
Dismount the database
Run a specific command
Wait until complete
Remount the database

Thank you!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
SQL Server DBA & Architect, EE Solution Guide
Awarded 2009
Distinguished Expert 2018
Commented:
Yes, the approach you are referring is the offline Defragmentation method..
But before that, recommend you to check how much white space is currently available and if significant white space is available then do the manual way of removing white spaces.
More info on how to check the white space availability and how to remove it here:
https://www.nucleustechnologies.com/blog/how-to-remove-white-spaces-in-exchange-database/
I hope the above suggestion clarifies your concern. Additionally, you may also get help from below articles:

How to Fix – Exchange Database (.EDB file) size grown too big
https://expert-advice.org/exchange-server/how-to-reduce-exchange-edb-file-size/

Also, please check this article which will help you understanding the puzzling mathematics of white space in Exchange Database: https://www.lepide.com/blog/the-puzzling-mathematics-of-white-space-in-exchange-database/
zito2000Network Manager

Author

Commented:
Thank you both.  Exactly what I needed!
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Raja Jegan RSQL Server DBA & Architect, EE Solution Guide
Awarded 2009
Distinguished Expert 2018

Commented:
Welcome, glad to assist!!
zito2000Network Manager

Author

Commented:
I had another question...
Since these are in a DAG group, there are essentially two database files on two separate servers. Do I need to do the defrag on both servers independently?
Raja Jegan RSQL Server DBA & Architect, EE Solution Guide
Awarded 2009
Distinguished Expert 2018

Commented:
>> Do I need to do the defrag on both servers independently?

No, you can just reseed the changes to the other database Servers in DAG.
If you have DAG, then it is advisable not to perform offline defragmentation of your exchange database as it would break the continuous availability..

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial