-> JBSAG1, JBSAG2 and JBSAG3 are part of a failover cluster without shared storage. Alwayson Availability group is configured between JBSAG1, JBSAG2 and JBSAG3. JBSAG1 is the current primary, JBSAG2 and JBSAG3 are synchronous secondary.
-> The requirement is to change the endpoint url to a different IP.
-> The reason is that we have a separate network link just for replication related activities that can be utilized for Always On and that has fewer checkpoints\firewall which will improve performance.
-> Below screenshot shows the current endpoint URL’s,
-> On the primary replica, I executed below TSQL,
USE MASTER GO ALTER AVAILABILITY GROUP [JBSwiki] MODIFY REPLICA ON 'JBSAG1' WITH (ENDPOINT_URL = 'TCP://10.0.2.4:5022'); ALTER AVAILABILITY GROUP [JBSwiki] MODIFY REPLICA ON 'JBSAG2' WITH (ENDPOINT_URL = 'TCP://10.0.2.6:5022'); ALTER AVAILABILITY GROUP [JBSwiki] MODIFY REPLICA ON 'JBSAG3' WITH (ENDPOINT_URL = 'TCP://22.214.171.124:5022');
-> I just have a single Availability group configured and the above code did the trick. If you have multiple AG’s, then you have to modify the above to script to properly reflect the AG name and execute for each available Availability group.
-> Checked the Always On Availability group dashboard and it was all fine.
-> Below screenshot shows the endpoint URL’s after above change,
-> It was an online operation. I did not even suspended the data movement. Everything went fine.
The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.