Can not access SQL Server by using Listerner Address with readonly
Can not access SQL Server by using Listerner Address with readonly
I have two instance of SQL Server running as AlwaysOn primary - replica. Now I want to setup connect reading database in replica. I have just setup my SQL Servers following this instruction: https://blogs.msdn.microsoft.com/alwaysonpro/2013/07/01/end-to-end-using-a-listener-to-connect-to-a-secondary-replica-read-only-routing/.
Now everything is ok. But I can access SQL Server by using Listener address from external if I don't use parameter readonly. In internal network it's ok
External network
sqlcmd -S <IP Listerner> -U <username> -P <password> -d <db name> -K readonly --> not connect
sqlcmd -S <IP Listerner> -U <username> -P <password> -d <db name> --> connected
Internal network
sqlcmd -S <IP Listerner> -U <username> -P <password> -d <db name> -K readonly --> connected
sqlcmd -S <IP Listerner> -U <username> -P <password> -d <db name> --> connected
1 Answer
1
It could be that the firewall is blocking certain ports. Make sure that port 5022 (the default port) and the port used for the listener are opened in the firewall.
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.