Remove Database Availability Group Server from Exchange 2016
DAG (Database Availability Group) is a collection of about 16 server mailboxes, which form the base component of Exchange Server. It hosts databases by providing an automatic recovery of database-level if it all anything goes wrong with servers or databases. However, there are times when admins must remove database availability group server from Exchange.
An operation of server recovery can be executed in a situation when the mailbox crashes, is lost, or fails even if it is not recoverable. The recovery operation will prove to be useful in even replacing the lost mailbox. In the following section, we will discuss the need and ways in which this can be done.
Remove Database Availability Group Server from Exchange 2016: Reason
Exchange Server offers the various set of features as well as functionalities for data management. It also gives the most useful feature to remove the Database Availability Mailbox Server from Exchange. Many times, there are situations where an organization needs to centralize everything on a single Exchange Server for better data management.
Moreover, cloud services are used by most organizations. Therefore, they move their complete data to O365 for complete management of data on the cloud. Once they migrate their data to Office365. It is required to remove the Database availability group server from Exchange.
Pre-Requisites to Complete
There are some pre-requisites, that are required to follow before performing the procedure to remove the database availability group Server.
- Users need to be assigned the proper permissions before performing the process.
- Before performing the operation, make sure that DAG is empty.
To check the DAG is empty, then, follow the mentioned step:- In the EAC, navigate to Servers then, choose Database Availability Groups. After that, the current DAG membership will be displayed in the Member Servers column.
- In the PowerShell, run the following command:
Get-DatabaseAvailabilityGroup EXDAG | Format-List Servers
If the DAG is not empty then, run the following command:
Remove-DatabaseAvailabilityGroupServer -Identity EXDAG -MailboxServer EXMBX -ConfigurationOnly
Technique to Remove Database Availability Group Server
Sometimes Direct Removal of DAG is not possible. This is especially true if your organization maintains multiple copies for redundancy purposes. In such a scenario follow these steps
Step 1. Gather all Mailbox Database Copies for that open a new instance of Exchange Management Shell with admin privileges and type:
Get-MailboxDatabaseCopyStatus * | sort Name | ft -AutoSize
Step 2. Move the Database Copies to another Exchange Server:
Move-ActiveMailboxDatabase -Server "ExSer01-2016" -ActivateOnServer "EX02-2016" -SkipMoveSuppressionChecks -Confirm:$false
Step 3. Delete the Copy of the Mailbox Database
Remove-MailboxDatabaseCopy -Identity "DtBs01\ExSer01-2016" -Confirm:$false
Step 4. You can also remove All Copies from Server at once.
Get-MailboxDatabaseCopyStatus -Server "ExSer01-2016" | Remove-MailboxDatabaseCopy -Confirm:$false
Step 5. Check to See if any copies are still Mounted:
Get-MailboxDatabaseCopyStatus * | sort Name | ft -AutoSize
Step 6. Remove Mailbox Server from DAG and also see if you still cannot access the mailbox in Exchange Server after this.
Remove-DatabaseAvailabilityGroupServer -Identity "DAG01-2016" -MailboxServer "ExSer01-2016" -Confirm:$false
If the server is lost/uncontactable you have to use:
Remove-DatabaseAvailabilityGroupServer -Identity "DAG01-2016" -MailboxServer "ExSer01-2016" -ConfigurationOnly -Confirm:$false
Other than this you can carry on with any of the following two ways.
Use EAC
- Route to Servers then, choose database availability groups options.
- Choose DAG, which is required to be removed >> click delete.
- Choose the yes option to confirm the warning and continue the removal process.
Use PowerShell
To remove the Database Availability run the mentioned command in PowerShell:
Remove-DatabaseAvailabilityGroup -Identity EXDAG
Command to Remove Database Availability Group Server
Many times, users need to remove the group from the server then, they can run the mentioned command in PowerShell:
Remove-DatabaseAvailabilityGroupServer -Identity EXDAG -MailboxServer EXMBX
Conclusion
Numerous situations arise in front of users due to which they need to remove the database availability group server from Exchange 2016. After understanding the user’s need, we have discussed a way to perform the operation of removal. If still, there is some issue then, feel free to put a comment below.
Frequently Asked Questions