SQL Server 2012 "Always On" "Listener" not working with named instance

  • vikas.chaudhary


    Points: 440


    I have setup "Always On" on named SQL Instances. I have setup the listener as well. I can not connect through listener if I don't use Listener DNS name followed by name of the instance in the Servername. I expect it to work without appending the name of the instance after the listener name. I have different instance names on different nodes, so I can't do automatic failover using the Listener.

    In case of default instance I believe I wouldn't be having this issue. Does listener works only with default SQL Instances or am I missing something here ?

    Thanks in advance,


  • Perry Whittle

    SSC Guru

    Points: 233678

    The listener has no concept of instance names, its a connection route into the AlwaysOn availability group. What details are you using to connect via the listener?


    [font="Tahoma"]"Ya can't make an omelette without breaking just a few eggs"[/font] 😉

  • vikas.chaudhary


    Points: 440


    Thanks for your reply.

    Consider this scenario:

    4 WSFC Nodes with each node having different instance names on them

    NodeName SQLInstanceName

    HANode1 DBS1

    HANode2 DBS2

    HANode3 DBS3

    HANode4 DBS4

    We then create a Availability group "AG1" on these nodes with a Listener name "AGListener" (Listener DNS Name).

    Initially HANode1\DBS1 is the primary DB server and if we try to conncect to this DB server through just a Listener DNS name, we will not be able to connect (which I thought should work). We need to say AGListener\DBS1 in order to connect to the DB instance. If you failover your Primary to node HANode4, then in order to connect to the DB Server we need to use DB Server Name as AGListener\DBS4 in the connection string.

    The whole idea of having a listener is not to change your DB Servername in the connection string and handle all the failovers seamlessly.

    The workaround for this is to have same SQL Instance names on all the nodes participating in WSFC. If it's a default instance on all the nodes, then we don't have to worry about anything.



  • navjyotn

    SSC Journeyman

    Points: 79

    I have configured a Listener (say AG_LITEN) with port 5152 using static IP on SQL 2012 named instances.

    When i try to connect using Listener in SSMS it doesn't connect whereas when i pass the IP port number (which i have used to configure the Listener) along with Listener name (AG_LISTN,5152) it work like a charm. I tried doing manual fail over and the same connection string connect to the new primary node.

    Give it a try.

  • yup

    SSCarpal Tunnel

    Points: 4490

    The browser service wont help detect the listener port. You will have to specify that in the conn string.

    Unless that 1433.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply