Wednesday, August 5, 2015

SQL Server AG listener creation with customized OU

Symptom:

USE [master]
GO
ALTER AVAILABILITY GROUP [TestDB1_AG]
ADD LISTENER N'VMMAG01' (
WITH IP
((N'10.0.2.201', N'255.255.255.0')
)
, PORT=1433);

Msg 19471, Level 16, State 0, Line 3
The WSFC cluster could not bring the Network Name resource with DNS name 'VMMAG01' online. The DNS name may have been taken or have a conflict with existing name services, or the WSFC cluster service may not be running or may be inaccessible. Use a different DNS name to resolve name conflicts, or check the WSFC cluster log for more information.

Msg 19476, Level 16, State 4, Line 3
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.

How to fix:

If servers in default OU, for example, it works per normal.

image

Otherwise, if in non-default OU, for example below, need to pre-stage the virtual computer objects (VCOs) and grant full right of Cluster Computer Object (CNO) on VCOs.

image