Build SQL Server AlwaysOn second (configure failover cluster) starting from 0

Source: Internet
Author: User
Tags failover in domain

Build SQL Server AlwaysOn second (configure failover cluster) starting from 0

First article
Http://www.cnblogs.com/lyhabc/p/4678330.html

Second article
Http://www.cnblogs.com/lyhabc/p/4682028.html

This second article, starting from 0, builds SQL Server AlwaysOn, which focuses on how to build a failover cluster because AlwaysOn is a Windows-based failover cluster

Before you explain the steps, you need to understand the failover cluster quorum configuration

The following image is from the Windows Server2012 System Configuration Guide

Quorum configuration for four clusters:

1, most nodes: This configuration does not use the quorum disk, and the so-called majority node is the number of normal nodes in the majority of cases, the cluster will provide services, or stop service. This configuration applies to clusters of for odd pages nodes, such as 5-node clusters, with a minimum of 3 normal nodes, and the cluster will serve

2, most nodes and disks: for the cluster of even nodes, he calculates the quorum disk in the number of legal quantities, for example, 4 nodes + 1 quorum disk node cluster, you can treat it as a cluster of 5 nodes, when the number of normal nodes must be at least 3, the cluster will provide service

3. Most nodes and file sharing: It is similar to (most nodes and disks), but the quorum disk changes to a file in a shared folder

4, no majority: only the disk, as long as the quorum disk offline, the cluster will stop providing services (not recommended, this way has been a long time ago)

Simply say the witness disk and the witness shared folder

The witness shared folder is the way the witness disk is introduced in Windows 2008 because the previous witness disk (the quorum disk) requires shared storage, which means that each node needs to mount the same disk, which is called the witness disk, which is placed on the shared storage

After the witness sharing folder is launched, we can use shared folders without the need for large shared storage.

We use a failover cluster with only two quorum configurations: (Majority node) and (majority node and file share)

If the cluster nodes are odd, use the majority node

If the cluster node is an even number, use the majority node and file share (you need to configure a shared folder, each node can access the shared folder, and the shared folder machine does not need to join the domain)

Attention:

Domain control does not require the Failover Cluster service and SQL Server to be installed, nor does it need to be joined to a failover cluster
All machine firewalls are turned off.
Two nodes need to install the same update, it is recommended not to turn on the Automatic Update feature, manually updated by the system administrator

SQL Server-AlwaysOn supports up to one primary replica and four secondary replicas, allowing up to three synchronous-commit availability replicas (including primary replicas), allowing up to two automatic failover replicas (including primary replicas)

Steps

This is also the step by step way to show you

1. Install failover cluster, two nodes install failover Cluster service simultaneously

2, two nodes after the failover cluster is installed, log off on one of the nodes, and then log on to the computer using the Dcadmin domain user

3. Open Failover Cluster Manager

4. In the Select Server or cluster interface, click the Browse button to add all the servers that will be joined to the cluster, and then click the Next button.

5. It is best to run all tests in the Validate a configuration wizard and to see all the settings for the cluster between servers, including network, shared disk, operating system, and so on.

You can view the report

There must be no failure in the report, or you will need to check what is causing the failure and fail to build the failover cluster.

Warnings to look at the situation, for the storage of the warning, because so far not add any storage device, here can be ignored, there are network warning

Because each node has only one network card, normally also need a heartbeat network card, so there will be a warning, because the experimental environment this warning can be ignored

The cluster report is stored under this path

C:\Windows\Cluster\Reports

6. Click Finish

7. Create Cluster Wizard

8. Enter the cluster name and VIP

Note: This is only the management name and management IP of the cluster, regardless of AlwaysOn

Since we do not currently have any storage, it is not checked to add all eligible storage to the cluster

The view report can see the appropriate disk for which the disk witness could not be found because we have not yet witnessed the shared folder or the quorum disk, which can be ignored

9. Cluster creation Complete

Virtual name of the cluster can be seen in domain-controlled AD users and computers

10, because we are two nodes failover cluster, so we need to add a shared folder, on the domain control to establish a shared folder, so that two cluster nodes can access

Note : If it is an odd number of nodes, this step is not required!

It doesn't matter if the shared folder is in the same machine (domain network) and not in the domain (standalone machine).

Production environment do not put the shared folder on the domain control!

Notice the conditions for the cluster to stop service

11. Create a new Quorumshare folder as a shared folder on the C drive of the domain control

The permissions for the Quorumshare folder are full Control for everyone

12. UNC path: \\WIN-FELBG10UU7F\quorumshare

Build a text file under the Quorumshare folder

13. Test the ability to access shared folders on two cluster nodes

Two nodes are logged in with the domain user dcadmin and test that the other two nodes can access the Quorumshare shared folder

14. Go back to the Failover Cluster Manager and fill in the File share path: \\WIN-FELBG10UU7F\quorumshare

Note: If the Quorumshare folder does not have Write permission , it will be rejected when filling in the file share path

15, you can see the shared folder will be generated under the VerifyShareWriteAccess.txt and Witness.log two files, as for the role of the two files everyone look at their filenames to know

Failover cluster is configured to complete here

Summarize

Through the above steps to demonstrate that the failover cluster configuration is complete, I hope you can see clearly, step by step configuration, basically there is no problem

The next article formally says SQL Server AlwaysOn builds

Related articles

Https://technet.microsoft.com/zh-cn/library/cc731739.aspx
Https://technet.microsoft.com/zh-cn/library/cc733130.aspx
Https://technet.microsoft.com/zh-cn/library/cc753341.aspx

If there is a wrong place, welcome everyone to shoot brick O (∩_∩) o

Build SQL Server AlwaysOn second (configure failover cluster) starting from 0

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.