Table of Content
    Exchange Server Recovery

    How to Fix Error – “Cannot be removed from the Database Availability Group because mailbox database has multiple copies”?


    Table of Content

      Summary: If you want to remove a member Exchange Server from Database Availability group, you must follow the steps to avoid errors, such as "Mailbox server cannot be removed from the Database Availability Group because mailbox database has multiple copies" error . In this article, you will learn to resolve the error message and remove the mailbox database from DAG safely.

      You, as an administrator, can remove an Exchange Server from a Database Availability Group (DAG) by using the Exchange Admin Center (EAC) or PowerShell cmdlets in Exchange Management Shell (EMS).

      You can use the Remove-DatabaseAvailabilityGroupServer PowerShell cmdlet to remove a server from the DAG. For instance:

      Remove-DatabaseAvailabilityGroupServer -Identity "DAG01" -MailboxServer "EXCHSRVIB01"
      Use this command Remove-DatabaseAvailabilityGroupServer

      The above command will remove the EXCHSRVIB01 server from the DAG named DAG01.

      To remove the server from DAG using the EAC,

      • Navigate to servers > database availability groups.
      database availability groups
      • Select the DAG and click on the manage DAG membership icon.
      click on the manage DAG membership icon
      • Select the server that you want to remove from the list of members, click on the remove icon (-), and click Save.
      Select the server that you want to remove from the list of members

      However, you may encounter an error when trying to remove the server from DAG. The complete error message appears as follows:

      ERROR
      Mailbox server EXCHSRV01 cannot be removed from the database availability group because mailbox database DB01 has multiple copies. Use Remove-MailboxDatabaseCopy either to remove the copy from this server or to remove the copies from other servers in the database availability group.

      Mailbox server EXCHSRV01

      To understand why such an error occurs, first see how the database copies are managed in a DAG.

      Understanding the DAG Architecture

      The main purpose of setting up a Database Availability Group (DAG) is to ensure high availability. In this setup, each member server has primary database and several copies of that database. The database copy continuously replicates data from the primary database. However, if the primary database is corrupted or any other issue occurs, the passive database copy becomes active and works as the primary database.

      Steps to Resolve Mailbox Server cannot be removed from the DAG Error

      A database in DAG may have multiple copies stored across member servers for redundancy. You must remove all the database copies from the member Exchange Server that you want to remove from the DAG. If you try to remove a server with database copies, you may get the error “Mailbox server cannot be removed from the database availability group because mailbox database DB01 has multiple copies.”

      Let’s see how to safely remove the database copies from the server and resolve the error.

      Step 1: Check the Database Copies

      First, you need to check which database copies are stored on the mailbox server that you want to remove from the DAG. Once you have the list of databases, you can remove the copies from the server and then remove the server from the DAG without any errors or issues.

      You can use the Get-MailboxDatabaseCopyStatus cmdlet (see the below example) to get the list of all database copies.

      Get-MailboxDatabaseCopyStatus * | sort Name | ft –AutoSize
      Use this Get-MailboxDatabaseCopyStatus

      In the above image, you can see that there are database copies on the Exchange mailbox server – EXCHSRVIB1.

      Step 2: Move Database Copies

      Before removing the database copies, you must move all the active database copies to a different Exchange mailbox server. Otherwise, you will encounter another error message.

      To move a mailbox database, you can use the Move-ActiveMailboxDatabase cmdlet (see the below example).

      Move-ActiveMailboxDatabase -Server "EXCHSRVIB02" -ActivateOnServer "EXCHSRVIB01" -SkipMoveSuppressionChecks -Confirm:$false
      Use this Move-ActiveMailboxDatabase

      Use the above cmdlet to move other active database copies.

      Step 3: Remove Database Copy from the Server

      Once the mailbox database active copies are moved, you can remove the database copies from the server. However, before proceeding, consider the following:

      1. Mailbox database copies can only be removed from a healthy database availability group (DAG). If the DAG is not healthy, you will not be able to remove any mailbox database copies.
      2. If you are removing the last passive copy of the database, ensure that continuous replication circular logging (CRCL) is not enabled for the specified mailbox database.
      3. After removing a database copy, you must manually delete any database and transaction log files from the server.
      4. The user account that you are using to remove database copies must be a member of the Organization Management role group.

      To remove the database copies using the Exchange Admin Center (EAC), follow the below steps:

      1. Log in to the EAC and navigate to servers > databases.
      Log in to the EAC and navigate to servers
      • Select the mailbox database (the copy of which you want to remove).
      • In the Details pane of the database, select the passive copy and click Remove.
      select the passive copy
      • Clicking yes to confirm the process.

      As an alternative, you can use the Remove-MailboxDatabaseCopy command to remove the database copies from the mailbox server.

      For instance:

      Remove-MailboxDatabaseCopy -Identity "MBXDB01\EXCHSRVIB01"

      You will receive a warning. Type Y and press Enter to confirm. The database copy will be removed from the server.

      If you want to remove all the database copies from the mailbox server at once, you can use the following command:

      Get-MailboxDatabaseCopyStatus -Server "EXCHSRVIB01" | Remove-MailboxDatabaseCopy -Confirm:$false

      Step 4: Again Check Database Copies Status

      Check that the mailbox server you want to remove from the DAG does not have any active database copies. For this, use the following command:

      Get-MailboxDatabaseCopyStatus * | sort Name | ft –AutoSize

      If the output does not display the mailbox server name you need to remove, you can go ahead and remove the mailbox server. If you see any database copy on the server with healthy or mounted status, remove the database copy and then proceed to the next step.

      Step 5: Remove the Server from DAG

      To remove the mailbox server from DAG with no active or mounted database copies, you can use the Remove-DatabaseAvailabilityGroupServer PowerShell cmdlet (see the below example) in the Exchange Management Shell (EMS).

      Remove-DatabaseAvailabilityGroupServer -Identity DAG01 -MailboxServer EXCHSRVIB1

      When prompted, type and press the Enter key.

      If you want to use the Exchange Admin Center (EAC) to remove the member server, follow these steps:

      • Open the EAC and log in as administrator.
      • Go to servers > database availability groups and then select the DAG.
      • Click Manage DAG Membership.
      Click Manage DAG Membership
      • Select the Exchange Server you want to remove and click the Remove (-) button.
      Select the Exchange Server you want to remove
      • Click Save. The mailbox server will be removed from the DAG.

      Conclusion

      The error message cannot be removed from the database availability group appears when you try to remove a member Exchange Server from DAG. To avoid this error, you must remove the active database copies from the mailbox server. In this article, we have explained how to safely remove the mailbox server from a Database Availability Group (DAG) after removing the database copies. If you still can’t remove the server, you can use an Exchange server recovery software, such as Stellar Repair for Exchange to move the users’ mailboxes from your faulty DAG member server to a database on a different member server. The software can extract the mailboxes of users from corrupt, inaccessible, and offline mailbox databases on the faulty server and export them to a healthy server in your DAG directly. After moving the mailboxes, you can remove the Exchange Server.

      Was this article helpful?

      No NO

      About The Author

      Anubhuti Sinha linkdin

      Anubhuti's passion for technology shines through her knowledge of Microsoft Exchange Server. She excels at managing, and troubleshooting this powerful platform. She has a bachelor’s degree in technology in the field of Electronics and Communication.

      Leave a comment

      Your email address will not be published. Required fields are marked *

      Image Captcha
      Refresh Image Captcha

      Enter Captcha Here :

      Related Posts

      WHY STELLAR® IS GLOBAL LEADER

      Why Choose Stellar?

      • 0M+

        Customers

      • 0+

        Years of Excellence

      • 0+

        R&D Engineers

      • 0+

        Countries

      • 0+

        PARTNERS

      • 0+

        Awards Received