For this scenario we have an old database that references a defunct server as well as a live server for it’s database copies. However, you are unable to remove this database.
Normally the steps to remove a defunct database are as follows:
- Remove DAG database copies on servers that have a ‘Healthy’ copy of the database.
- Move or remove any mailboxes that may be present to another database
- Move or remove any archive mailboxes to another database
However this command does not work for archive mailboxes. Since we know that the old database is defunct we need to simply redirect the user attribute for the Personal Archive to the new location for the archive:
The attribute msExchArchiveDatabaseLink needs to be changed to the correct database. The short name of the old database was Database02 and the new Database02-New. You should only need to change that part of the attribute.
4) Move arbitration mailboxes to another database
5) Move any search mailboxes to another database
6) Remove the database from Exchange
7) Delete any files related to the database to free up disk space
What if, after you’ve performed Steps 1 – 5 and Step 6 fails. The error message is the same if you fail to remove the arbitration or search mailboxes. What could be causing this? Take a look at any recent Move Requests to new databases, which would happen if you’ve moved the mailboxes off to delete the mailbox database.
Key here is the TargetDatabase. If there is a move that matches the database you want to delete, you will be unable to delete the mailbox.
So the logical step would be to delete the move request. What if that failed?
If we dig into the user involved we can see the attributes that are set that show that a mailbox move request is associated with the user account:
As you can see there are several attributes that associate the old Move Request to the mailbox. The easiest way to clear the request if it fails in the Exchange Management Console is to simply set all of these values to ”
Now that we have the mailboxes, personal archives, mailbox moves, search mailboxes, arbitration mailboxes and move requests cleared from the database, the database is now removable.