SQL Server Alwayson Setup troubleshooting record One

Source: Internet
Author: User
Tags failover

Days to build AlwaysOn, encounter a bunch of problems, to solve it took a lot of time, hereby write down a few representative, so as to avoid the subsequent encounter to do repetitive work.

First, create an availability group

Using the SSMs Create Availability Group wizard, add a primary replica node1, one secondary replica node3, and the last step to complete the error:

You cannot create, join, or add replicas to the availability group "XXXXX" because the node "Node3" is the possible owner of the replica "Node1" and "Node3".
If a replica is a failover cluster instance, remove the overlapping nodes from its possible owners, and then try again. (Error: 19405)

  

Workaround:

1) in the server Failover Cluster Manager, locate the following role in the cluster, click on the role you want to build AlwaysOn on, right-click on the server name below, and in the Pop-up Properties dialog box, select the Advanced Policies tab to see the "Possible owners" The list box lists the name of the node within the cluster, put the other tick, Node3 the tick off, and click OK. In this way, theoretically node3 is not a possible owner of Node1 and Node3.

Online has said that this can solve the problem, but according to the actual operation found not, but also need to do the following operations.

2) Modify the possible owners of the cluster in PowerShell

Run the Get-clusterresource command on the PowerShell command line to view resource within the cluster

Other resources in SQL Server 1 above, use Get-clusterownernode to view possible owners of SQL Server

It is possible that the owner has node1,node2,node3 three nodes, using the cmdlet command to modify the SQL Server Clusterownernode

Get-clusterresource-name "SQL Server" | Set-clusterownernode-owners Node1,node2

where "SQL Server" is the query above the RESOURCE,NODE1,NODE2 is the rest of the cluster inside the node.

Looking again at ownernodes under SQL Server, there is no node3. Then create the availability group and it succeeds.

Reference: https://dba.stackexchange.com/questions/142603/ failed-to-create-join-or-add-replica-to-availability-group-in-sql-server-2014

SQL Server Alwayson Setup troubleshooting record One

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.