Microsoft Exchange team releases Exchange Server Security Updates (SUs) when vulnerabilities are discovered. You don't…
An error is showing up when trying to remove a mailbox database. The error is telling that this mailbox database is associated with one or more move requests. Why is the error message showing up and what is the solution to it? We moved all the mailboxes to a new mailbox database. We dismounted the old mailbox database and clicked the delete button in the Exchange Admin Center.
Table of contents
Solution to error mailbox database is associated
There are one or more move requests associated with the mailbox database that we like to remove. Check the move requests of the source and target mailbox database. The solution is to remove all the move requests on the database.
Error: This mailbox database is associated with one or more move requests. To get a list of all move requests associated with this database, run Get-MoveRequest -SourceDatabase <Database ID> and Get-MoveRequest -TargetDatabase <Database ID>. To remove a move request, run Remove-MoveRequest.
Check mailboxes in database
Run Exchange Management Shell as administrator. Mount the database if it’s dismounted. Check if there are mailboxes in the database. There should be no mailboxes in the database. The output should give no result.
[PS] C:\>Mount-Database "DB06" -Confirm:$false [PS] C:\>Get-Mailbox Database "DB06"
We confirmed that there are no mailboxes in the database.
Get list of move requests associated with database
Get a list of all move requests associated with the database that you want to remove. We are going to check the source database and target database. Make use of the Get-Moverequest cmdlet and SourceDatabase parameter.
[PS] C:\>Get-MoveRequest -SourceDatabase "DB06" DisplayName Status TargetDatabase ----------- ------ -------------- Piper Dylan Completed DB01
Do the same, this time with TargetDatabase parameter.
[PS] C:\>Get-MoveRequest -TargetDatabase "DB06" DisplayName Status TargetDatabase ----------- ------ -------------- Sam Blake Completed DB06
Move requests are completed but not removed at both the source and target database. We can safely remove the completed move requests in the next step.
Remove move requests in database
Remove the completed move requests. If you have completed move requests on other databases, they will be removed too. It will not remove the mailbox but only remove the completed move requests. The -Confirm switch will not show the confirmation prompt.
[PS] C:\>Get-MoveRequest -MoveStatus Completed | Remove-MoveRequest -Confirm:$false
Check the source database again and confirm that the result is empty. Check the target database and confirm that it’s empty as well.
[PS] C:\>Get-MoveRequest -SourceDatabase "DB06" [PS] C:\>Get-MoveRequest -TargetDatabase "DB06"
Dismount the database and remove the database. Press Y and press Enter.
If you are getting the error this mailbox database contains one or more mailboxes, mailbox plans, archive mailboxes, public folder mailboxes or arbitration mailboxes. Read the article cannot delete mailbox database Exchange 2016.
[PS] C:\>Dismount-Database "DB06" -Confirm:$false [PS] C:\>Remove-MailboxDatabase -Identity "DB06" Confirm Are you sure you want to perform this action? Removing mailbox database "DB06". [Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): Y WARNING: The specified database has been removed. You must remove the database file located in E:\DB06\DB06.edb from your computer manually if it exists. Specified database: DB06
Make sure to start File Explorer on the Exchange Server and go to the location of the database. Delete the database and the logs folder manually.
Conclusion this mailbox database is associated error
In this article, you learned why an error is showing when trying to remove a mailbox database. Run the commands in the article to verify and fix the error this mailbox database is associated with one or more move requests. You may also like Export a list of mailboxes to text in Exchange. Don’t forget to follow us and share this article.