How to Rename an Existing DAG in Exchange 2010

Saturday, September 15, 2012
Technically you can’t rename an existing Database Availability Group, but you can recreate it with a new name.  It's possible to do this without requiring that the databases within the DAG to reseed.

Here are the steps to recreate a DAG with a new name:
  • Suspend all backups and disable circular logging if it's enabled.  This will ensure you have all the transaction logs required to update the database copies when you're done.

  • Remove all database copies from the DAG.  This will remove them from the DAG, but doesn’t actually delete the database files on the server.
Remove-MailboxDatabaseCopy -Identity DB01\MBX3
  • Remove all nodes from the DAG using the -ConfigurationOnly switch.  The Mailbox servers will be evicted from the DAG's cluster and removed from the DAG object in Active Directory.
Remove-DatabaseAvailabilityGroupServer -Identity DAG -MailboxServer MBX3 -ConfigurationOnly
  • Remove the DAG.  Now that the DAG has no members, it can be deleted from Exchange and Active Directory.
Remove-DatabaseAvailabilityGroup -Identity DAG
  • Clean up the cluster service on each node.  This restores the configuration of the Cluster service on the specified node to its original state.
cluster node /force
  • Restart the Microsoft Exchange Replication service on each node.  Now each server is in standalone.  Databases should mount and be accessible.
Restart-Service MSExchangeRepl
  • Create the DAG with the new name.  Ensure your DAG properties and network settings are correct.
New-DatabaseAvailabilityGroup -Name DAG3 -WitnessServer EXHUB2 -DatabaseAvailabilityGroupIPAddresses 10.0.0.8,192.168.0.8
  • Add the nodes to the new DAG.
Add-DatabaseAvailabilityGroupServer -Identity DAG3 -MailboxServer MBX3
  • Add mailbox database copies.  Exchange will see that the database copies already exist in the target file system and will resume replication.
Add-MailboxDatabaseCopy -Identity DB01 -MailboxServer MBX3 -ActivationPreference 3

As long as there wasn’t a tremendous amount of data churn (>~10%) you won’t need to reseed the databases.  Exchange will just replicate the logs generated from the time you removed the database copies.

Remember to resume your Exchange backups and reconfigure circular logging if it was previously enabled.

2 comments:

  1. Do you need to dismount your databases before performing any of these tasks?

    ReplyDelete

Thank you for your comment! It is my hope that you find the information here useful. Let others know if this post helped you out, or if you have a comment or further information.