Azure環境:1臺 DC+2臺SQL 2012(用庫中的SQL VM,不是VM自搭建SQL Server)node
故障:ide
在AlwaysOn嚮導,出現這樣的錯誤信息:部署
Failed to bring availability group 'HADB' online. The operation timed out. Verify that the local Windows Server Failover Clustering (WSFC) node is online. Then verify that the availability group resource exists in the WSFC cluster. If the problem persists, you might need to drop the availability group and create it again.it
Failed to create availability group 'HADB'. The operation encountered SQL Server error 41131 and has been rolled back. Check the SQL Server error log for more details. When the cause of the error has been resolved, retry CREATE AVAILABILITY GROUP command. (Microsoft SQL Server, Error: 41131)io
解決方法:ast
1.建立NT AUTHORITY\SYSTEM帳號class
USE [master] GO CREATE LOGIN [NT AUTHORITY\SYSTEM] FROM WINDOWS WITH DEFAULT_DATABASE=[master] GO
2.受權NT AUTHORITY\SYSTEM帳號
GRANT ALTER ANY AVAILABILITY GROUP TO [NT AUTHORITY\SYSTEM] GO GRANT CONNECT SQL TO [NT AUTHORITY\SYSTEM] GO GRANT VIEW SERVER STATE TO [NT AUTHORITY\SYSTEM] GO
PS:在IaaS VM部署alwayson注意哦,建立完羣集後手動配置羣集IP。