2

I inherited some 2016 SQL Servers with an availability group and listener. The SQL instances are set up to use port 30001, and the AG listener is also set up to use port 30001. When I connect using the listener, I DO NOT have to specify the port--it just works. I know it shouldn't work, based on all the documentation. Can anyone tell me how this might be possible? In what scenario could you connect to a listener on a non-default port without having to specify the port?

  • 1
    Is the SQL Browser service running? – Tony Hinkle Apr 10 at 14:59
  • 1
    The port and instance name are interchangeable, you just need to supply one of them. You are most likely using SQL Browser's functionality to traduce the instance name to a port. – EzLo Apr 10 at 15:01
  • 1
    Yes, the SQL Browser is running, but the documentation states that the AG Listener does not use the SQL Browser. – Lisa Apr 10 at 15:04
  • 1
    Did you try connecting to the listener while also specifying the port? Can you run this after connecting, and show us the results? select net_transport,local_tcp_port,auth_scheme from sys.dm_exec_connections where session_id = @@SPID. – Randi Vertongen Apr 10 at 19:55
  • 1
    What happens if you try using the listener IP instead of listener name? That should eliminate possible alias interference. – HandyD Apr 11 at 1:14

Your Answer

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

Browse other questions tagged or ask your own question.