I received a question on if it was possible to decommission a DAG, so that the Exchange 2010 servers would become stand-alone Exchange servers and the databases remain available on one server, freeing up other mailbox servers. I assume the customer has valid reasons for wanting to do so, like downsizing without requirements justifying the DAG. To answer that question: of course that is possible. Now, while many blogs are happy to tell you how to create a DAG there aren’t many on how to dismantle one, so here goes.
For this blog I use a small setup which consists of a single DAG (DAG1) with member servers L14EX1 and L14EX2 hosting two databases, MDB1 and MDB2; both servers host an active copy.
In this example we’re going to decommission DAG1, where in the end the L14EX1 will host both databases and L14EX2 is freed up.
Before we decommission the DAG, we’ll reorganize the active databases so when removing database copies we’re removing passive copies. We’ll start by checking if the health status of the DAG:
Get-MailboxDatabaseCopyStatus *
We see databases are mounted and copies are in a healthy state. Next, we’ll active the copies on the L14EX1, because we’ll be freeing up the L14EX2:
Move-ActiveMailboxDatabase –Server L14EX2 –ActivateOnServer L14EX1 –Confirm:$false
Verify the databases are now properly mounted on the L14EX1:
Next, we’ll be removing the passive copies hosted on the L14EX2. Use Get-MailboxDatabaseCopyStatus instead of Get-MailboxDatabase because Remove-MailboxDatabaseCopy needs the database name specified together with the server name hosting the copy, e.g. “SERVER\DATABASE”. Note that after removing the copy, the files are still present on the file system which you need to clean up manually:
Get-MailboxDatabaseCopyStatus –Server L14EX2 | Remove-MailboxDatabaseCopy –Confirm:$false
With all passive database copies removed, we can now remove the L14EX2 from the DAG. Note that when removing a non-last member server, the node will also be evicted from the cluster and the quorum will be adjusted when necessary.
Remove-DatabaseAvailabilityGroupServer –Identity DAG1 –MailboxServer L14EX2
Next, do the same thing for the remaining node, the L14EX1. Note that this server still hosts (active) database copies which is ok; the cmdlet will detect this is the last member server of the DAG and will also remove the cluster object.
After the last member server has been removed from the DAG, we now have an empty DAG object which we can remove:
Remove-DatabaseAvailabilityGroup –Identity DAG1 –Confirm:$false
Et voila, L14EX1 now hosts both databases and the L14EX2 is freed up and you can uninstall Exchange from that server if required.
Kindly leave your comments if you have any questions.
Pingback: NeWay Technologies – Weekly Newsletter #29 – February 7, 2013NeWay | NeWay
Thank you for simplifying this task. Your example and step-by-step explanation made perfect sense. 🙂
LikeLike
Pingback: Remove a DAG with Active Databases and other Exchange Tricks | Adventures of an Oregon K12 IT Director
Maybe you should just add a note concerning Public Folders that need to be replicated before decommissioning the old server. I know this article is focused on DAG, but forgetting about PF before killing a server can be a problem. Besides this, great article.
LikeLike
After perfoming above task. I can go ahead and remove Cluster Service?
LikeLike
Once the servers are stand alone, can I then proceed to uninstall Exchange? I’ve been unable to uninstall the mailbox role because the mailboxes still exist. I used the remove-mailbox PS command and effectively deleted over 780 active directory accounts – that was a HUGE screw-up. We are no longer using Exchange and the servers are ear-marked for another project. I need to decommission Exchange properly so in case we ever want to go back to Exchange, it will be possible to re-install.
Any extra advice on that set up?
LikeLike
Just uninstall Exchange through Setup, that’s the supported method. You may wish to decommission the one holding the system mailbox last, or else you may need to move it around first.
LikeLike
Just used this tonight. Thanks. It was very helpful and worked flawlessly.
LikeLike
Was very helpful for the dilemma I was in which allowed me re-use existing hardware and VMs. Thank you!
LikeLike
Hi,
Is it ok to follow this for one server recovery? Actually, We have 2 Node DAG with multi role. No Edge server. Now, we are doing some disaster recovery testing. We did restore one of the DAG member using setup:Recoverserver installation and did clean up second server and removed DAG as well. After that we restored the database from backup to server original location. To mount database, we changed restore database “MasterTyper” from “DatabaseavailabilityGroup” to our server restored server FQDN name. Everything is working fine except our current outlook client is is not able to connect with this. I can configure new outlook profile and its working fine but we need this recovery should work with our current setup. Please note: For this testing, we restored the Domain Controller as well. Please suggest, you can help us to point out cause of this this issue.
LikeLike
1) Why recover from backup – reseed was not an option? (recovered copies are often too outdated, causing divergence and reseeding anyway);
2) What doesn’t work – is the certificate reinstalled?
3) At what moment – and why – did you restore the DC?
LikeLike
Here is brief steps we followed for testing environment.
– Restored one of DC from Backup (2 Week Old) and transferred all roles to make it workable
– Restored one of DAG member which had active copies from Backup(latest backup)
– Clean up like removed database copy,removed other member server from DAG, removed DAG completely.
– Point the casarray name to recovered server IP
– Restored the database to original location (Recovered server) thorough Symantec backup Exec.
– Changed “MasterType” and “MasterserverorAvailabliltyGroup” to “server” and “FQDN of Recovered server”
Then we did following testing –
-Outlook new profile creation (Successful)
-OWA access (Successful)
-Autodiscovery (Successful)
Now, we thought to connect one of production environment client to this testing environment but it failed to connect. I hope this will enlighten you more about my query.
Please suggest.
LikeLike
Forgot to add, We add the certificate also and assign to the services as well.
LikeLike
Michel,
What actions to do if you have a public folder database in the DAG?
Regards
LikeLike
DAG-wise none; PF are no part of DAG in Ex2010. So, the general decommissioning of Public Folder databases apply (if you want to get ride of one), or move contents to another database by replication contents.
LikeLike
Hi Michel,
Do you need to stop or ‘pause’ the copying/syncing of the databases across the servers before deleting the passive copies? Otherwise won’t Exchange recreate them and start replicating across once you’ve deleted them?
Many thanks
LikeLike
You’re removing the passive database copy, which removes the (logical) copy (and thus stops replication); it doesn’t mean remove the files of the copy. Files will still be there for you to clean up.
LikeLike
Hi I have two servers in my dag I want to remove one and then turn the other into single server instead of dag the problem when I try to remove the passive server it say it is activated set for data center mode and I cannot remove it
what am I doing wrong
Thank you
LikeLike
I’m facing the same issue described above. I’m down to last two Exchange 2013 servers in DAG and cannot remove due to data center mode being activated. How do I disable that?
LikeLike
Set-DatabaseAvailabilityGroup –Identity ‘Name of DAG’ –DatacenterActivationMode Off
LikeLike
Thanks to you for writing this and thanks to Google for bringing me here! Really appreciated your instruction and insight.
BTW… this worked fine in Exchange 2013.
LikeLike
Hi, after I properly decom the DAG, can I recreate them again?
LikeLike
I don’t see a reason why not
LikeLike
Hi, I have a case like that, to convert a DAG to stand-alone server.
I concern if I can remove DAG using this procedure during working hours or mailboxes will be inaccessible for a while, as the mailbox access endpoint will change from DAG name to standalone server.
Thank you
LikeLike
The DAG name is not client access endpoint. Dismantling DAG to single servers only affects HA options.
LikeLike
Yes I know that clients use CAS for connection. Question was regarding connectivity between CAS and MBX.
Anyway I have already done the decommission following you instructions without any problem.
Thanks you again.
LikeLike
What about the applications pointing to cluster IP? after removing the DAG, stand alone server will not have cluster IP anymore and SMTP connectivity will loose till we add another secondary IP (cluster IP) on network interface or change the IP to cluster IP. I guess. Is it right solution? Is there any better way to handle this. Please suggest.
LikeLike
Applications shouldn’t point to the cluster name nor IP. Clients connect to hosts, preferably through load balancer.
LikeLike
Thanks Michel. we don’t have loadbalancer. We have 2 node DAG and i have already removed one node yesterday. Now, I want to remove DAG to make server standalone. this server has two IP now, one cluster and another server IP. Our applications are point to cluster IP, which is going to remove after DAG and Cluster.
LikeLike
You can use DNS and point clients/apps to one (or both) nodes. Since you are decommissioning the DAG, I assume availability isn’t a concern for this client.
LikeLike
Actually clients connected to CAS or CAS array, except PF access.
RPCClientAccess parameter of databases instruct clients for connection point
If you don’t have external NLB and use WNLB, you should have separated CAS servers. (2 clusters on the same system not allowed)
So you don’t have to repoint clients to any member of DAG. If you split and CAS cluster then you have to repoint CAS array name to remaining CAS server
LikeLike
My CAS arrary is already pointing to cluster IP. It’s like casarray,clustername both are pointing to same ip. Now, my question when i will delete the DAG, cluster feature will remove automatically or i have to remove manually? If, its remove automatically, server will have only one IP which will be different than the CASarray IP, so client will lost connectivity till I put casarray IP as a secondary IP on the server interface. Correct me if i am wrong.
LikeLike
I cannot imagine how DAG based on MS failover cluster have same IP with CAS array based on NLB. CAS based on IIS witch is not MSCS aware. DAG VIP is a property of DAG configuration. CAS array VIP is a property of NLB based cluster. Clients look for RPCclientaccessserver parameter to locate the DNS name of CAS server and not for DAG IP. I have already decommissioned a DAG using the procedure of this article without any problem.
LikeLike
Hi,
Does this procedure work if the server being removed is the DAG/cluster PAM. I need the SAM to become the stand alone hosting the database.
Thanks
Pete
LikeLike
The PAM is the one owning the cluster quorum; so the last node standing will always be a PAM, and every node you remove from the DAG before that is or will become SAM. You can move the PAM role using Move-ClusterGroup.
LikeLike
what happens when i dos’t have a connection to second dag nodes because physical damage on remote sites? i need to mount the local copy on the working site but i got an error because no connection to other damaged cluster nodes?
LikeLike