Is an AlwaysOn Availability Group Listener required for all AGs?

Posted on 2012-08-22
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
    LVL 28

    Expert Comment

    by:Ryan McCauley
    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

    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

    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

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Introduction In my previous article ( I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
    JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
    This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
    Via a live example, show how to setup several different housekeeping processes for a SQL Server.

    728 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now