Exchange 2013 – Database Deletion – the Saga continues

I’ve posted a couple of articles on issues with database deletions and there are plenty on the web as well. Recently I had a client that needed to remove a database to free up a set of drives for another project. We went through the normal removal process and verified that no mailboxes were present in the database – arbitration, discovery, monitoring and archive mailboxes:

get-mailboxdatabase db01 | get-mailbox
get-mailboxdatabase db01 | get-mailbox -Arbitration
get-mailboxdatabase db01 | get-mailbox -Monitoring
get-mailboxdatabase db01 | get-mailbox -archive

In the process one archive mailbox was discovered, not moved because it belonged to a user who had recently left. Simple. I fired up a migration for the archive mailbox and waited for the move to complete. Which it did in about a minute. We tried to again remove the database. No go. Checked and the archive move showed completed. Checked with PowerShell and the archive was still there.

To determine the root cause of the problem we need to run a check on the migration batch that was used to move the archive. We can only really do this with PowerShell:

Get-MigrationBatch -IncludeReport |fl

The results I received looked like this:

As you can see, the status is ‘Completed’, however there is also a ‘ValidationWarningCount’ of 1. The warning message states there is another migration batch attached to the same user. In order to move the archive we need to remove the old Migration batch(s) that are referencing this mailbox. This process can be done in PowerShell or in the EAC. I prefer PowerShell:

get-migrationbatch | remove-migrationbatch
After removing the migration batches the Archive mailbox move worked perfect this time around. Once again we tried to delete the mailbox and received this error now:

So now we need to move all Mailbox Exports, which we had just completed for an archive migration project to the cloud. All of these requests were tied to this database which had served as the local archive database for all mailboxes on prem. To delete this requests we need to user PowerShell:

get-mailboxexportrequest | remove-mailboxexportrequest

With these removed we were now able to remove he mailbox database from the server and re-allocate the drives. As you can see, sometimes a simple database move can turn into a bit of a rabbit hole. Hope this helps you in your Exchange troubleshooting.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s