Having issues trying to get the READONLY intent to work on our AlwaysOn setup.
SETUP is
Azure VM
NIS-SQL01
NIS-SQL02
They run with a AlwaysOn High Availability, this works fine, the AGL also works fine from outside the Azure environment. However when we try and define the connection to be READONLY, we are still getting the Primary Server when connecting.
running
select ar.replica_server_name , ar.endpoint_url , ar.replica_server_name , ar.availability_mode_desc , ar.failover_mode_desc , ar.session_timeout , ar.primary_role_allow_connections_desc , ar.secondary_role_allow_connections_desc , ar.backup_priority , ar2.read_only_routing_url from sys.availability_replicas ar inner join sys.availability_read_only_routing_lists avr on ar.replica_id = avr.replica_id inner join sys.availability_replicas ar2 on avr.read_only_replica_id = ar2.replica_id
NIS-SQL02 TCP://NIS-SQL02.NISCLOUD.local:5022 NIS-SQL02 SYNCHRONOUS_COMMIT AUTOMATIC 10 ALL READ_ONLY 50 tcp://NIS-SQL01.NISCLOUD.local:1433
NIS-SQL01 TCP://NIS-SQL01.NISCLOUD.local:5022 NIS-SQL01 SYNCHRONOUS_COMMIT AUTOMATIC 10 ALL READ_ONLY 50 tcp://NIS-SQL02.NISCLOUD.local:1433
select dns_name,port,is_conformant,ip_configuration_string_from_cluster FROM sys.availability_group_listeners
AGL 50666 1 ('IP Address: CORRECT_IP')
select * from sys.availability_replicas
71284784-C2F6-4693-902A-8FD2108AAC96 1F9E1C25-7402-496F-99DA-808EBDBBFD83 65538 NIS-SQL01 0x010500000000000515000000F339C67C0A4FE3FAA41097E8E9030000 TCP://NIS-SQL01.NISCLOUD.local:5022 1 SYNCHRONOUS_COMMIT 0 AUTOMATIC 10 2 ALL 1 READ_ONLY 2014-07-08 11:05:59.727 2014-07-08 11:05:59.727 50 tcp://NIS-SQL01.NISCLOUD.local:1433
1309D653-0B34-4D61-9894-4A3C6061359D 1F9E1C25-7402-496F-99DA-808EBDBBFD83 NULL NIS-SQL02 NULL TCP://NIS-SQL02.NISCLOUD.local:5022 1 SYNCHRONOUS_COMMIT 0 AUTOMATIC 10 2 ALL 1 READ_ONLY NULL NULL 50 tcp://NIS-SQL02.NISCLOUD.local:1433
SELECT * FROM sys.availability_read_only_routing_lists
71284784-C2F6-4693-902A-8FD2108AAC96 1 1309D653-0B34-4D61-9894-4A3C6061359D
1309D653-0B34-4D61-9894-4A3C6061359D 1 71284784-C2F6-4693-902A-8FD2108AAC96
I can connect directly from one of the NIS-SQL servers to both of the read_only_routing_urls.
Made sure the Firewall settings allow for incomming connections on the specified ports.
I feel like i have tried almost everything that I could find through google, run through the MS Knowledge base step by step trying to find what might be wrong without any issues to the setup.
So hope that there might be some here who could shine some light or give som ideas on what I might be missing.
Regards,
Mike