Tuesday, March 22, 2016

Configuration of SQL2012 AlwaysOn High Availability Group fails - Microsoft SQL Server, Error: 41158

Error:

TITLE: Microsoft SQL Server Management Studio
------------------------------

Failed to join the instance 'xxxxx' to the availability group 'ClusterAVG'. (Microsoft.SqlServer.Management.SDK.TaskForms)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.5058.0+((SQL11_PCU_Main).140514-1820+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

Failed to join local availability replica to availability group 'ClusterAVG'.  The operation encountered SQL Server error 41106 and has been rolled back.  Check the SQL Server error log for more details.  When the cause of the error has been resolved, retry the ALTER AVAILABILITY GROUP JOIN command. (Microsoft SQL Server, Error: 41158)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.5058&EvtSrc=MSSQLServer&EvtID=41158&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

Solution:

Run script on both SQL AlwaysOn nodes:

use [master]
GO
CREATE LOGIN [DOMAIN\COMPUTERNAME$] FROM WINDOWS
GO
GRANT CONNECT ON ENDPOINT::[Hadr_endpoint] TO [DOMAIN\COMPUTERNAME$]
GO

No comments:

Post a Comment