Im getting error the following error when trying to run the above SP to validate my replication schema:
Msg 21892, Level 16, State 1, Procedure sp_hadr_validate_replica_hosts_as_publishers, Line 60
Unable to query sys.availability_replicas at the availability group primary associated with virtual network name 'MyAGListener' for the server names of the member replicas: error = 18456, error message = Error 18456, Level 14, State 1, Message: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'..',
I've already tried to manually register the AG listener name with setSPN, and confirmed that the name, all the AG replicas, and the replication distributor and subscribers have registered SPNs against the SQL Service Account (going so far as checking ADSIEdit.msc on my domain controller), but I'm still getting the error even though I'm running the query under the same account (which is SA on all instances, as well as domain admin on all boxes), and when I check the connection with "SELECT auth_scheme FROM sys.dm_exec_connections WHERE session_id = @@SPID" on the primary node and AG listener, it still shows as connecting using NTLM instead of KERBEROS.
Funnily, before I ran setSPN on the AG listener name, only the AG listener and primary AG replica (where WSFC and AG were set-up from) returning NTLM. All other replicas, subscribers, and distributor were returning KERBEROS. If I failed over my AG group to a replica running with KERBEROS, connecting as the AG listener name still reported NTLM. I failed back to my primary replica and after I ran setSPN, I still go the same result, except when I failed over to a secondary replica with KERBEROS, AG listener also returned KERBEROS. However running the above validate replica hosts SP still gave me the same error.
By the way, regardless of the error, I still get the first result back from the validate replica hosts SP returning the correct AG listener name. Also failing over is still automatically failing over transactional replication, so whatever is happening doesn't seem to be detrimental to the process.
Am I missing something?
Diane