How to delete Exchange 2010 database on SBS 2011 Standard simply - no need to move data

Exchange 2010 fully patched on SBS 2011 Standard.
Client migrated to Office 365 and no longer needs or wants the Exchange database which is taking up a lot of disk space.
I don't need to move any mailboxes - I just want to back up Exchange (doing now with server backup) and delete the database.
I have the impression that removing the database is not possible with a simple command as it may tell me there are critical mailboxes that haven't been moved.
Is there a way to delete the database outright and free the disk space without a major operation?
I don't necessarily need to delete Exchange Server totally, though I could.  I mainly want to free the disk space in the fastest way possible.
davebo4503Asked:
Who is Participating?
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.

Jose Gabriel Ortega CEE Solution Guide - CEO Faru Bonon ITCommented:
You just can't remove a database from exchange server if it contains active mailboxes.

I suggest you 2 solutions:

1. The 1st solution and the safest one it's to create a New Database and then create move request from all the user's and system mailboxes.

How to do this?
1st Check the number of mailboxes by the database using my script
https://gallery.technet.microsoft.com/office/Auditing-Exchange-07c35e83

This will give you the accounts types and numbers by database
cas1-1-.png
Get-MailboxesCountByDatabase.ps1 -Count

2nd Create Move request to move them from the actual database to the new database.
Get-Mailbox -Database <DatabaseName> | New-Moverequest -targetDatabase <NewDatabaseCreated>

Open in new window


3 Clean up the move-requests and
Get-MoveRquest| Get-MoveRequestStatistics  #=> to check progress
Get-MoveRquest| where{$_.status -eq "completed"} | Remove-moverequest -confirm:$false #=> to remove requests

Open in new window



4  Finally, remove the database from exchange server (because it doesn't contain any mailbox) and clean up the files from the disk


What would do this?.
Clean up logs in a not so easy way but secure to not lose any data of any user.



2. The second solution is faster but you have a risk that the database will never go back on, at least you use other software.
So it would be enabling circular logging on all the database to reduce the Log Size.
I have a script for that:

https://gallery.technet.microsoft.com/office/Enable-CircularLogging-In-beaaa3bd

What it does this script?:
Enable Circular logging
Unmount and mount each database (to make the change effective).

In the mount part is the risk one, but if it's a decent size edb file (database) you will be just fine.

This 2 methods will reduce the database  size consumption on disks

Aditional Information:
you can check if your database file is full of logs with this script:
https://gallery.technet.microsoft.com/office/What-is-the-size-of-my-0e1993a7#content
This will give you the EDB and LOG sizes.
if you see that LOG SIZES >> EDB. then you can solve it using any of the above answers
0
davebo4503Author Commented:
Jose, If I understand this right I have to move all the existing mailboxes to a new database in order to delete the current one?
I'm confused by this, because I don't want the mailboxes anymore, and if I have to copy them to another database, won't that require as much additional disk space as they're taking now?  I would need additional hardware to do this I think?  Is there a way to delete all the mailboxes first and then remove the database?
0
Jose Gabriel Ortega CEE Solution Guide - CEO Faru Bonon ITCommented:
Yes, it is. you have to move all the current mailboxes to another DB in order to remove the actual db.
To move to another DB you would need the space, yes, but a portion of it.

The point is.
do you have office 365 hybrid or just cloud?

if you have hybrid you can't just delete the mailboxes because you're gonna delete the user's as well and you will mess up your infrastructure.

if you are working just cloud it's safe to remove them.

you can just create a user, to export them to pst and archive them.
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

davebo4503Author Commented:
It's O365 cloud only.  Mailbox data has already been migrated so I have no need or use for the local exchange mailboxes anymore.  I don't want to spend a ton of time copying data that I don't need.  I just simply want to delete the mailboxes and the database.
0
Jose Gabriel Ortega CEE Solution Guide - CEO Faru Bonon ITCommented:
well, in that case, remove exchange completely and done.
0
davebo4503Author Commented:
Not to be rude, and thanks for responding, but if you had read my initial post it said I was looking for the quickest way to remove a database and reclaim disk space.
I'd rather not go through all the steps of removing Exchange.  I was looking for the quickest way to delete the database and get the space back.  Is that possible without a lot of gyrations?  Anyone?
0
Jose Gabriel Ortega CEE Solution Guide - CEO Faru Bonon ITCommented:
It's an exchange server dave, there's no such a thing as a "quick way" or a GUI to just delete all and done.
if you don't want to waste time moving mailboxes "that you don't need" why don't just remove all the mailboxes, clean up your exchange and re-use or sell the server to somebody that will work with it?

It's just cheaper than wasting power on that. It's my point of view, and I already answered your question, detailed and fast responses are above.

My point is that just removing mailboxes won't reclaim the DB space, they will be soft deleted and after a period of time "it will be deleted" but the DB will still have the space on disk busy, at least you unmount it, defragment it using eseutil and mount it again.

So the answer is an exchange, it just doesn't work that way, and I did read your question.

To remove any database from exchange it doesn't have to contain any mailboxes, it's a pretty clear statement.
or just format C:\ and remove the items from the AD, that's my final answer.
0
davebo4503Author Commented:
Received the answer from MS support - including below:
1. Connect the configuration partition in your AD by using the ADSIEDIT tool .

 

2. Then go the below mentioned path to delete the database.

 

CN=configuration,DC=domain,DC=com-CN=services-CN=Microsoft exchange-CN=Administrative Groups-CN=Exchange Administrative group-CN=Databases then select the database that you want to delete.


3.Go to the database location to remove the physical database files, if you installed Exchange to the default path then the mailbox will be stored in C:\Program Files\Microsoft\Exchange Server\V14\Mailbox.
0

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
davebo4503Author Commented:
It was provided by the software vendor's support in another forum.
0
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
Exchange

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.