Wednesday, September 21, 2022

Database availability group server cannot be removed from database

I was decommissioning the old Exchange 2013 environment with Database Availability Group.

I got an error when removing the Exchange servers from the DAG: 

Error: “Database availability group server EXCHANGESERVER cannot be removed from database availability group DAG since it is currently set for datacenter activation mode and it requires at least two mailbox servers.”
I tried again in PowerShell

Remove-DatabaseAvailabilityGroupServer -Identity <DAGName> 
-MailboxServer <ExchangeServer>


Solution 

From an Exchange PowerShell, run the following command: 
[PS]Set-DatabaseAvailabilityGroup <database availability group name> -DatacenterActivationMode Off

Now we can remove each of the DAG members form Exchange Admin Center
Or from PowerShell
[PS]Remove-DatabaseAvailabilityGroupServer -Identity <DAGName> 
-MailboxServer <ExchangeServer>

Then remove DAG 


And uninstall Exchange from each of the Exchange servers




No comments:

Post a Comment