SharePoint connect to SQL AG

SHUO .H 706 Reputation points
2021-01-14T15:11:50.867+00:00

Hi there,

A simple question: there is a SharePoint will connect to backend SQL Database. The database is SQL Always On AG. We have a two information: SQL AG Cluster Name is SQLAG, SQL AG Listener is SQLListener; When we connect to SQL AG our connection string will be:

SQLAG\SQLListener or SQLListener\SQLListener or SQL Hostname\SQLListener

Thanks

Microsoft 365 and Office | SharePoint Server | For business
{count} votes

3 answers

Sort by: Most helpful
  1. sadomovalex 3,636 Reputation points
    2021-01-14T15:32:33.147+00:00

    usually connection string contains servername\dbname. You may also use SQL alias and use this alias name for connection string - but under the hood alias should still contain servername and dbname it refers to.

    0 comments No comments

  2. trevorseward 11,711 Reputation points
    2021-01-14T16:20:04.437+00:00

    You should be using the fully qualified name for an AOAG Listener (listener.corp.example.com). Do not use a SQL Alias or single server name. SQL Aliases are used for database mobility. AOAG is mobile already.

    0 comments No comments

  3. Chelsea Wu 6,341 Reputation points Moderator
    2021-01-15T06:11:15.203+00:00

    SQL AG Listener name, SQLListener is used in this scenario.
    See the examples of connection string via this document: Connect to an Always On availability group listener.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    **Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. **

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.