In some situations, it might be necessary to move a master replica to a different machine. If you do not need to use the same host name and port number, use dsconf change-repl-dest to change the host name and port number of the remote replica. For more information, see To Change the Destination of a Replication Agreement.
If you need to retain the same host name and port number, you must remove the master from the existing topology, and then re-add the master to the topology.
It is much easier to use DSCC to perform these tasks, because DSCC takes care of any impacted replication agreements. If you use DSCC, however, you cannot specify the same replica ID that the master originally had in the topology. To use the same replica ID, you must use the command line to perform these tasks, as follows.
Make sure that all changes from the master have already been replicated.
If you can, back up the master using binary copy so that you do not lose any changes.
Demote the master replica to a hub replica.
Wait for the hub to start replicating to other servers.
When the hub opens a replication session to the other servers in the topology, it remains in the RUV but is no longer used in referrals.
Stop the hub.
Remove the hub from the topology.
Add the master replica, using the same replica ID.
Recreate the replication agreements from that master to the other replicas in the topology.
Initialize the new master.