MSExchangeGuru.com

Learn Exchange the Guru way !!!

 

Unable to delete Exchange database – This mailbox database contains one or more mailboxes

We will take a look at a common error we encounter while trying to delete an Exchange database.

——————————————————–

Microsoft Exchange Error

——————————————————–

The mailbox database ‘DB1’ cannot be deleted.

DB1

Failed

Error:

This mailbox database contains one or more mailboxes, mailbox plans, archive mailboxes, or arbitration mailboxes. To get a list of all mailboxes in this database, run the command Get-Mailbox -Database <Database ID>. To get a list of all mailbox plans in this database, run the command Get-MailboxPlan. To get a list of archive mailboxes in this database, run the command Get-Mailbox -Database <Database ID> -Archive. To get a list of all arbitration mailboxes in this database, run the command Get-Mailbox -Database <Database ID> -Arbitration. To disable a non-arbitration mailbox so that you can delete the mailbox database, run the command Disable-Mailbox <Mailbox ID>. To disable an archive mailbox so you can delete the mailbox database, run the command Disable-Mailbox <Mailbox ID> -Archive. Arbitration mailboxes should be moved to another server; to do this, run the command New-MoveRequest <parameters>. If this is the last server in the organization, run the command Disable-Mailbox <Mailbox ID> -Arbitration -DisableLastArbitrationMailboxAllowed to disable the arbitration mailbox. Mailbox plans should be moved to another server; to do this, run the command Set-MailboxPlan <MailboxPlan ID> -Database <Database ID>.

This is because the exchange setup process setup /p or /prepareAD creates these accounts.

First run the cmdlet to see that you have the Arbitration mailboxes alive

Set-AdServerSettings -ViewEntireForest $True

This is because Arbitration mailboxes are created on the root domain by default.

Now run:

Get-Mailbox -Arbitration | Ft Name, Database

Now if you need to remove it and have another database available to home these, run the cmdlet:

Get-Mailbox -Arbitration | Set-Mailbox -Arbitration -Database “Name of the new Database”

If you want to Move Arbitration to a new mailbox store and the old store is mounted and well,

Get-Mailbox -Arbitration -Database “CurrentDatabase” | New-MoveRequest -TargetDatabase “NewDatabaseName”

Lets say the database contains mailboxes other than Arbitration and you want to move all of them to a new mailbox store and the old store is mounted and well,

Get-Mailbox -Database “CurrentDatabase” | New-MoveRequest -TargetDatabase “NewDatabaseName”

If you want to Disable Arbitration mailboxes run:

Get-Mailbox -Arbitration -Database “CurrentDatabase” | Disable-Mailbox -Arbitration

If you want to remove Arbitration mailboxes run:

Get-Mailbox -Arbitration -Database “CurrentDatabase” | Remove-Mailbox -Arbitration –RemoveLastArbitrationMailboxAllowed

Now for some reason these Arbitration mailboxes went missing, then find the version of your exchange server using the cmdlet, then download the appropriate service pack and run setup /p

GCM exsetup |%{$_.Fileversioninfo}

You may also replace the homeMDB value of the Arbitration mailbox with the DN of a mailbox database too.

#########Update#########

To move Arbitration mailboxes from Exchange 2010 to Exchange 2013:

Get-MailboxDatabase -IncludePreExchange2013 | FL Name,Server,AdminDisplayVersion

Get-Mailbox -Arbitration | New-MoveRequest -TargetDatabase <NewDatabaseinExchange2013>

Ratish Nair
MVP Exchange
Team @MSExchangeGuru

18 Responses to “Unable to delete Exchange database – This mailbox database contains one or more mailboxes”

  1. Jeremy Says:

    Great Article! Worked perfectly to get rid of a stubborn Mailbox DB.

    Thank you!!!
    Cheers!

  2. Himanshu Says:

    Great article..Thanks for sharing…..

  3. Marcel Says:

    Also battled with a DB that would not be removed, this fixed it!

  4. Andy Says:

    Great Articel ! it saves my day. thx

  5. Noor Says:

    Thank You.

    You Saved my time.

  6. Alexandre Bordignon Says:

    Thankk you so much, this article saved me

  7. Steve Rackham Says:

    Hi
    I have this error and have been through these steps but each query is coming up empty.
    I cannot find any mailbox and am not sure where to go from here. Any further advise greatly appreciated.
    Thanks for your help

    Regards
    Steve.

  8. Prabhat Nigam Says:

    @Steve
    Extract the AD attributes for all users with homemdb and msexchhomeservername

    homemdb will tell you the database name and msexchhomeservername will tell you on which server they belong to.

    If you don’t need these user with on this database or server then blank the attribute. Make sure you backup AD systemstate before doing any change in AD attributes

  9. Move database and log folder path in Exchange 2013 « MSExchangeGuru.com Says:

    […] Unable to delete Exchange database – This mailbox database contains one or more mailboxes: https://msexchangeguru.com/2013/04/18/arbitration-mailboxes/ […]

  10. Monty Says:

    What command would I use if the Database was deleted that had the Arbitration mailboxes and I run “Get-Mailbox -Arbitration | Ft Name, Database” and it still thinks its in the old database even though it does not exist. Plus the files *.edb and logs have been removed, but I still have the AD accounts. Can I still run the command that you listed even though you mention that the old store has to be mounted? Or is there another command I should be using?

    Get-Mailbox -Arbitration | Set-Mailbox -Arbitration -Database “Name of the new Database”
    If you want to Move Arbitration to a new mailbox store and the old store is mounted and well,

  11. Prabhat Nigam Says:

    If the database was deleted then you can’t move. Did you delete the database from ADSIEDIT and who recommended this?

    Here is the solution.
    1. You need to disable these mailboxes.
    Get-mailbox -Arbitration -Identity “mailbox name” | Disable-Mailbox –Arbitration –Confirm:$False

    2. Now enable the mailbox
    Enable-mailbox -Arbitration -Identity “mailbox name”

  12. Monty Says:

    The mailbox that it thinks its in no longer exists. I can try to disable but if that even works and I enable the arbitration mailbox where will it be created?

  13. David Says:

    this is the information I was looking for to remove the LAST mailbox from Ex2010 on prem. TechNet has all the data… somewhere, but it’s buried in clicks. thanks for putting it on a single screen. What TechNet doesn’t share is that some of the | methods are what you must do. Doing the commands straight fail everytime, but letting the get-mailbox collect the data and | to disable then the | to remove, all good.

  14. Rob Says:

    That was the best article to remove 2010 from a server. My Scenario was 2007 existing server migrating to 2010. I then decided to scratch that and redo the server for 2012 R2 and Exchange 2013. So that quickly fixed the removal process of Exchange 2010. Thanks!

  15. Diego Tomazzoni Says:

    Very tks!

  16. Charles Says:

    Our situation is the edb is corrupt and no repair scenario will work. I am able to extract the mailboxes to psts in order to load them into a new database however I can’t find a way to delete the old as exchange still sees it having mailboxes etc.

    We’ve been down two days all backups are also corrupt and we have no way to recover except start fresh and load from PST somewhat like a migration.

    Please help!!

  17. Charles Says:

    Also I don’t think I said that the edb will not mount no matter how we try, my best thought is to start clean and reload from pst.

  18. Prabhat Nigam Says:

    Hi Charles,
    Sorry to hear about your issue. When you are stuck in a disaster then you need professional service which you can get through writing an email to team@MSExchangeGuru.com or info@GoldenFive.net

    We can’t guarantee to help you by commenting on a post but through email yes.

Leave a Reply

Categories

Archives

MSExchangeGuru.com