Cannot join database to AG using GUI if replica SQL Instance is not running on default port 1433
I am running a cluster of 2 nodes where the SQL service is not running on the default port 1433. When I try to add a database to the AG using GUI I get stuck at �Connect to Existing Secondary Replicas� window. I click on Connect but the �Connect to Server� login form has the server name with no port specified and I cannot modify it as it is grayed out.
Similar issue when the replica has multiple IPs and you specify the SQL instance to listen to a certain IP. When connecting to existing Secondary replicas you might get �Instance Failure� error. This is not always happening; it depends on which IP you get connected to.
Workaround is to join the new database using sql scripts.
Another workaround (not very practical) is to remove the replicas, join the DB on the primary, and then add the replicas again.
There's a devious way to change the server name in the connection dialog - switch to the Additional Connection Parameters tab and add "Data Source=servername,portnumber"
That may not unblock this entire scenario, though.
Shawn Melton (wshawnmelton) commented
This also effects SMO, which is likely why this issue exist. So automation around dynamically looking up the secondary replicas to perform an action are lost since the port number is dropped from the Name property.