add listener

Can someone tell me what are the benefits to add listener to the availability group. It looks like this is an optional step.  How many listeners for each availability group?

I am using SQL 2016
wasabi3689Asked:
Who is Participating?
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
The Listener is used to allow a client to always connect to the Primary Replica without the need to know which SQL Server instance is acting as Primary. The same applies if you want to use the Listener to always connect to a Secondary Replica (e.g. Reporting proposes).
You can have more than one listener if you want to.
1
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
NOTE: If you don't create a Listener, applications need to connect directly to a SQL Server instance and when a failover occurs you need to manually change the application configuration string to point to the new Primary Replica. The usage of a Listener will automate this and the client won't notice when a failover occur because the Listener will then point to the new Replica. It's all about the Business Continuity process.
0
 
wasabi3689Author Commented:
What listener Ip should be? It should not be any of replicas up, correct? Should not be application server up, correct? Should be an up never used under the same domain, correct?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Mark WillsTopic AdvisorCommented:
You need to read : https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/listeners-client-connectivity-application-failover

An availability group listener consists of a Domain Name System (DNS) listener name, listener port designation, and one or more IP addresses. Only the TCP protocol is supported by availability group listener. The DNS name of the listener must also be unique in the domain and in NetBIOS. When you create a new availability group listener it becomes a resource in a cluster with an associated virtual network name (VNN), virtual IP (VIP), and availability group dependency.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
What listener Ip should be?
A listener should have a virtual IP and must be created as a Cluster resource so it can failover through the nodes where the Replicas belongs to.
If you are used to work with SQL Server Cluster instances, then you can see the Listener as the virtual IP for a SQL Server cluster instance that it points to the active node.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
wasabi, a feedback will be appreciated.
0
 
Mark WillsTopic AdvisorCommented:
Waiting for Wasabi to respond....
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Hi Mark.
Do you really think that the points for this question should be equally split between us?
You just posted a link and paste some sentences from that link that doesn't really answer OP's questions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.