I've configured AG1 with PROD_DB1 & PROD_DB2, AG2 with DR_DB1 & DR_DB2. Endpoint configured with service account.
Database is synchronized on DR_DB1 & Restoring state on DR_DB2. I cannot execute following query on DR_DB2
ALTERDATABASE [db1] SET HADR AVAILABILITYGROUP = [ag2];
because of AG2 is in disconnected state. Looks like below:
1distributedag1ag1 ASYNCHRONOUS_COMMITCONNECTEDPRIMARYONLINEHEALTHY2distributedag1ag2 ASYNCHRONOUS_COMMITDISCONNECTEDSECONDARYNULLNOT_HEALTHY
I only opened 5022 port between Prod & DR site with following endpoint ip address. Joined secondary cluster with distributed configuration.
1. Should I need to open 1433 port between sites?
2. From which settings should I look for troubleshooting in this situation?