Is an AlwaysOn Availability Group Listener required for all AGs?

Posted on 2012-08-22
Medium Priority
Last Modified: 2012-09-10
I am running a 2-node MSSQL 2012 AlwaysOn cluster.  We will be hosting SCOM, WSUS, and a few other databases in this instance.  In all cases we would like to maintain some level of failover however is provisioning an Availability Group Listener necessary for all AGs?

In other words, take WSUS for instance.  I would like the database to be resilient however wouldn't it be sufficient to connect to the cluster name instead of creating a listener (and wasting an IP address) when we do not need to have readable secondaries or span multiple sites?  

When is an AG Listener necessary and when it is not under such a 2-node deployment?
Question by:LNKDLNY2
  • 2
LVL 28

Expert Comment

by:Ryan McCauley
ID: 38325257
The listener is basically a connection point for the instance, and in my understanding (though I've not rolled out AlwaysOn myself), it acts in the same way that the cluster resource network name and IP act in a standard cluster. As such, in order to mask the active server from clients, you'd need an AG Listener for each AG, since that's how clients connect. If you don't have an AG Listener, clients can still connect, but they'd need to do so by using the actual server name, so your client would need to be aware of what servers are involved in the AG - adding the listener just means you can point your clients there and let the cluster service handle where they actually get directed.

Author Comment

ID: 38325342
Thanks for the response.  So if I am reading this right, it would not be wise to connect to the cluster name because the active node in the failover cluster may not necessarily be the primary node in the AG and automatic routing to the proper primary instance only works if you are using the AG listener, correct?
LVL 28

Accepted Solution

Ryan McCauley earned 1500 total points
ID: 38325485
The cluster name is owned by whatever node owns the quorum drive, but the AG Listener network name is what you use to connect the actual databases. Since the SQL Instance is installed as stand-alone, not as clustered, the AG Listener is what allows the Windows Cluster service to manage access.

I was a bit confused by AlwaysOn at first, but here's the way I look at it now. It's exactly the same as database mirroring was in previous versions, except that instead of the connection string specifying a primary and failover partner, the Windows Cluster service manages client connections. You can set up mirroring without a cluster, but the cluster (and the AlwaysOn AG Listener) allow you to create a single point of contact for the clients that will refer them to whatever node is more appropriate (the primary for writes, or a standby read-only if that's all it needs).

Does that make more sense?

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question