We've got a multisegment AG Listener named SQLAGL01
which points to these two addresses:
10.143.162.32 (the primary server)
10.140.165.32 (DR server)
Because the 3rd party (which means we can't fix it, and no we can't migrate to something else) application software uses old drivers which don't support MultiSubnetFailover=True
, we're seeing issues where reports fail half the time because SQLAGL01
resolves to the DR address 10.140.165.32.
Following the Microsoft docs, we set RegisterAllProvidersIP=0
and restarted the cluster. However, SQLAGL01
still resolves to the DR address half the time.
In Failover Cluster Manager, the AG Listener's owner node is the primary server, and the DR address is offline. (Is that normal?)
Here's a screenshot of the cluster role:
EDIT: Added RegisterAllProvidersIP
value.
PS C:\windows\system32> get-clusterresource "Cluster Name" | Get-ClusterParameter RegisterAllProvidersIP
Object Name Value Type
------ ---- ----- ----
Cluster Name RegisterAllProvidersIP 0 UInt32
EDIT 2: Added AG cluster resource values. There doesn't seem to be a RegisterAllProvidersIP
resource for the AG Listener.
EDIT 3: Added the actual Listener resource value.
PS C:\windows\system32> get-clusterresource KYHIXSQLAGL01_KYHIXSQLAGL01 | Get-ClusterParameter RegisterAllProvidersIP
Object Name Value Type
------ ---- ----- ----
KYHIXSQLAGL01_KYHIXSQLAGL01 RegisterAllProvidersIP 1 UInt32
Best Answer
In your question, you included the following check to validate that you've set the
RegisterAllProvidersIP
to false:If you've used the Cluster Name then you have set the
RegisterAllProvidersIP
parameter on the wrong object.There are several similarly named objects in your screenshot:
WC01
AG01
AGListener01
To validate how the setting is configure, you should use the listener name not the cluster or AG name:
Or, to do this a bit more stepwise, you can do
Get-ClusterResource
and you'll see something like this:Out of all of these things, we only care about the objects that belong to the OwnerGroup for the AG. We can filter a bit further with
Get-ClusterResource | Where OwnerGroup -eq AG01
:These 4 items represent the resources that make up my AG: The AG itself, the listener (listed as "Network Name"), and the two IP addresses, each in different subnets.
The item that I want to check for the
RegisterAllProvidersIP
parameter is the listener (Network name) resource:Get-ClusterResource AGListener01 | Get-ClusterParameter
will give me the full list of parameters on the Listener object:And I can get the specific parameter by explicitly asking for it
Get-ClusterResource AGListener01 | Get-ClusterParameter RegisterAllProvidersIP
If this is not set to 0, then you would need to use the block of code outlined in the docs, and be sure you're using the Listener name, and not the Cluster name. The example also recommends setting the TTL as well (picking an exact number is up to you, though the docs suggest 300 seconds). Note that offlining & onlining the Listener is necessary for the new settings to be picked up by the DNS name:
After this is done (and the old TTL is expired), you'll be able to see the Lister has only a single IP address configured: