SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


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


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

Author
Message
vikas.chaudhary
vikas.chaudhary
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 Visits: 155
Hello,

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,

Vikas
Perry Whittle
Perry Whittle
SSC-Insane
SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)

Group: General Forum Members
Points: 20084 Visits: 17244
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?

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
vikas.chaudhary
vikas.chaudhary
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 Visits: 155
Hello,

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.

Cheers,

Vikas
navjyotn
navjyotn
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 138
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
yup
SSChasing Mays
SSChasing Mays (624 reputation)SSChasing Mays (624 reputation)SSChasing Mays (624 reputation)SSChasing Mays (624 reputation)SSChasing Mays (624 reputation)SSChasing Mays (624 reputation)SSChasing Mays (624 reputation)SSChasing Mays (624 reputation)

Group: General Forum Members
Points: 624 Visits: 1029
The browser service wont help detect the listener port. You will have to specify that in the conn string.
Unless that 1433.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search