Link to home
Start Free TrialLog in
Avatar of davebo4503
davebo4503

asked on

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.
Avatar of J0rtIT
J0rtIT
Flag of Venezuela, Bolivarian Republic of image

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
User generated image
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
Avatar of davebo4503
davebo4503

ASKER

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?
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.
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.
well, in that case, remove exchange completely and done.
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?
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.
ASKER CERTIFIED SOLUTION
Avatar of davebo4503
davebo4503

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