0

Experts,

I have 2 node Availability Groups with File share witness.

We chose the non standard port 17333 for the Listener and 15333 for the 2 SQL Server instances.

One of our newer application was giving issues connecting to listener and was expecting same port number for listener and sql instance.

Can someone advise what is the best practice.

Possibly we can have have a) Same ports for listener and all sql instances b) Different port for listener and same port for sql instances c) Different port for each of listener and sql instances

1

According to this Microsoft Tech Community post, you can do any of the three port configurations you have listed.

You can choose the port numbers in many different ways.

  • Specify different port numbers for each instance and a different port number for the Listener.
  • Specify the same port number for all the instances (as a standard), and a different port number for the Listener.
  • Specify the same port number for all the instances as well as the Listener. This is possible because the IP address of the SQL Server instance is different from the IP address of the Listener.

It goes on to suggest the following as a possible best practice.

  • Don't turn on the SQL Browser service
  • Use the same non-default port number for SQL Server instances as well as for the Listener
  • Specify the port number whether connecting to a SQL Server instance, or connecting to the AG Listener

This practice may or may not work for all customers, but maintains consistency of the connection strings with or without the SQL Server Browser, with default or non-default port numbers, or whether connecting to the SQL Server instance or the AG Listener.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.