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

Tuesday, March 8, 2016

Error: 0x800f080c - Feature name NetFX3 is unknown

Error: 0x800f080c - Feature name NetFX3 is unknownSolution:1- Browse folder: "c:\Windows\Servicing\Packages"2- Take the owner ship of the folder and grant full access for administrators group.3- Copy the SXS folder contents to folder: "c:\Windows\Servicing\Packages"4- Install the Framework 3.5 normally from Control Panel > add windows features.

Error: Could not find attribute: 'dNSHostName'

Command:

Move-ADDirectoryServerOperationMasterRole -Identity "Target-DC" -OperationMasterRole 0,1,2,3,4

Error:
Move-ADDirectoryServerOperationMasterRole : Could not find attribute:
'dNSHostName' on object: 'CN=XXXX,CN=Servers,CN=Default-First-Site-Name,CN=S
ites,CN=Configuration,DC=XXXX,DC=LOCAL'.
At line:1 char:1
+ Move-ADDirectoryServerOperationMasterRole -Identity "XXXX"
-OperationMasterRo ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
    + CategoryInfo          : NotSpecified: (XXX:ADDirectoryServer) [Move-
   ADDirector...ationMasterRole], ADException
    + FullyQualifiedErrorId : ActiveDirectoryServer:0,Microsoft.ActiveDirector
   y.Management.Commands.MoveADDirectoryServerOperationMasterRole


Solution:
In my case there was a wrong DNS settings in the IPv4 configuration. After correcting the DNS in the IPv4 the command ran successfully.