In this article, we will learn the step by step configuration of SQL Server AlwaysOn High availability Group for two nodes. Once nodes are added to the cluster group, we will able to use the AlwaysOn feature in the SQL server.
在本文中,我们将学习两个节点SQL Server AlwaysOn高可用性组的分步配置。 将节点添加到群集组后,我们将能够使用SQL Server中的AlwaysOn功能。
In the following steps, we will create a Service account to connect SQL server instances. The Service account will be used to connect the SQL instance from both the node servers.
在以下步骤中,我们将创建一个服务帐户来连接SQL Server实例。 服务帐户将用于从两个节点服务器连接SQL实例。
创建服务帐户 (Create a Service Account)
We will log in to the Domain controller and perform the following steps.
我们将登录到域控制器并执行以下步骤。
Open Server Manager, Tools and Click Active Directory Users and Computers.
打开服务器管理器 , 工具,然后单击“ Active Directory用户和计算机” 。
In Active Directory Users and Computers window, Right-Click Users > New > User as shown in the following Fig.
在“ Active Directory用户和计算机”窗口中, 右键单击“用户”>“新建”>“用户” ,如下图所示。
In this step, we will create a Service account username, Specify the service account login name and Click Next
在此步骤中,我们将创建一个服务帐户用户名,指定服务帐户登录名,然后单击“下一步”。
Specify a Password and tick the options for User cannot change password and Password never expires. We need to select Password never expires option because, if the password expired, the service account login would fail, and it will cause a problem to the high availability configuration.
指定密码,然后勾选“ 用户无法更改密码 , 密码永不过期”选项 。 我们需要选择“ 密码永不过期”选项,因为如果密码过期,则服务帐户登录将失败,这将对高可用性配置造成问题。
Click Finish to complete the service account creation process.
单击完成以完成服务帐户创建过程。
配置管理员权限,Windows用户和服务帐户的登录名 (Configure Administrator permission, windows user and login for the service account)
Once the Service account created on the Domain controller, we need to add service account as a member of the administrator account on both nodes.
在域控制器上创建服务帐户后,我们需要在两个节点上将服务帐户添加为管理员帐户的成员。
Connect to both node servers SQL1 and SQL2 and perform below steps
连接到两个节点服务器SQL1和SQL2并执行以下步骤
- Add Service account as an Administrator 将服务帐户添加为管理员
- Create a Windows user for the Service account 为服务帐户创建Windows用户
- Create a Windows authentication login for a service account login in the SQL database instance 在SQL数据库实例中为服务帐户登录创建Windows身份验证登录
Open Server manager and Select Tools and Computer Management
打开服务器管理器,然后选择“ 工具和计算机管理”