Exchange 2010 zero out Exchange database

I am moving mailboxes to new databases and need to know if there is a easy way to zero out the present database. I would like to remove the white space with the exception of any metadata that we might need to keep running the DB.
techdriveAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jamie McKillopIT ManagerCommented:
Hello,

The only way to remove whitespace from a database is to do an offline defrag. I don't recommend you do this as it isn't without risk and will require downtime. Are you moving all mailboxes out of this database or are you leaving some behind?

-JJ
Justin YeungSenior Systems EngineerCommented:
http://exchangeserverpro.com/defrag-exchange-2010-mailbox-database/

explained how to defrag the database and get whitespace back.
techdriveAuthor Commented:
OK LET ME change my question. I am just only interested in zeroing out the DB. After I move the users out I just want to remove all of its reaming contents.
Defend Against the Q2 Top Security Threats

Were you aware that overall malware worldwide was down a surprising 42% from Q1'18? Every quarter, the WatchGuard Threat Lab releases an Internet Security Report that analyzes the top threat trends impacting companies worldwide. Learn more by viewing our on-demand webinar today!

Jamie McKillopIT ManagerCommented:
In that case, just dismount the DB and delete it in EMC.

-JJ
techdriveAuthor Commented:
well what about the metadata.
Jamie McKillopIT ManagerCommented:
What metadata are you referring to?

-JJ
techdriveAuthor Commented:
I actually found the answer after doing some reading and receiving some assistance from you guys. I am just going to defrag the DB which will clean all the white space and relcaim it.
Jamie McKillopIT ManagerCommented:
If you don't have any mailboxes left in the database, defragging it is a waste of time. If you want to start with a blank database in order to reuse it, just dismount the database then delete the edb and log files. Remount the database and it will create a new blank database.

-JJ
techdriveAuthor Commented:
jjmck I did exactly What you said and this works. I could not get exchange to work running the eseutil command.
techdriveAuthor Commented:
The only problem I ran into is what happens to a disconnected mailbox once I dismount, delete the DB, mount database and start over. Also what happens if I use the defrag method for cleaning white space what happens to the disconnected mailbox. For example a user was disconnected 10 days ago, and I deleted DB or defragged DB. Is this user still recoverable or am I SOL.
Jamie McKillopIT ManagerCommented:
If you delete the DB, you will not be able to recover a disconnected mailbox. If you defrag, you will be able to recover a disconnected mailbox.

-JJ

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
techdriveAuthor Commented:
jmmck answers have been able to allow me the opportunity to provide a custom solution
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.