最近工作涉及到搭建sqlserver always on集群,这里稍作问题记录。
主要的环境搭建流程可以参照博客:
https://www.cnblogs.com/FreeFire/p/4903577.html
https://blog.csdn.net/dba_huangzj/article/details/55045325
这两篇博客讲的以及非常详细了,不过我还是遇到几个问题。
1.在新建alwayson可用性组的过程中,碰到了“检查共享的网络位置”的错误
原因是当前sqlserver用户对共享文件夹没用操作权限,具体操作方法参考:https://jingyan.baidu.com/article/c85b7a6458739a003aac9554.html
2.配置alwayson 高可用时,在最后一步出错(主副本的连接未处于活动状态)
解决方案是更改sql server 登陆方式为 域管理员账户
3.添加侦听器时出现以下报错:
The Windows Server Failover Clustering (WSFC) resource control API returned error code 5057. The WSFC service may not be running or may not be accessible in its current state, or the specified arguments are invalid. For information about this error code, see "System Error Codes" in the Windows Development documentation.
The attempt to create the network name and IP address for the listener failed. The WSFC service may not be running or may be inaccessible in its current state, or the values provided for the network name and IP address may be incorrect. Check the state of the WSFC cluster and validate the network name and IP address with the network administrator.
The attempt to create the network name and IP address for the listener failed. The WSFC service may not be running or may be inaccessible in its current state, or the values provided for the network name and IP address may be incorrect. Check the state of the WSFC cluster and validate the network name and IP address with the network administrator. (Microsoft SQL Server, Error: 41009)
原因是你指定的IP在当前的网段已经被占用。例如,我当前建Cluster的3个Node的IP分别是172.20.160.22、 172.20.160.23、 172.20.160.55,群集的IP是172.20.160.12。 那么你创建侦听器的时候是不能指定这些已用的IP,如上面截图所示,当你指定为172.20.160.22时就会遇到题目所说的异常。知道原因后,就好解决了。当我重新建的时候,我指定了IP 172.20.160.13,这个IP未被占用,PING不通。这个时候,就可以成功地创建侦听器。