Quantcast
Channel: SQL Server High Availability and Disaster Recovery forum
Viewing all articles
Browse latest Browse all 4689

ALWAYSON readonly connect to server through Listener and connection testing

$
0
0

Hi I already configured always on(2016 EE R1) two node replica. I need to setup read intent routing connection depending on the role. That mean when I connect to Always on using listener name using SQL Server management studio and setup "additional connection parameters  ApplicationIntent =ReadOnly.   After connect I checked the server select @@servername  and always connect to active primary.

Before that I set up read only routing as follows. This has executed this same script  on both nodes while active by failover over and fail back  process.

https://www.sqlshack.com/how-to-configure-read-only-routing-for-an-availability-group-in-sql-server-2016/

secondly I tested though following method. But still I can see the primary node.

sqlcmd -s AGlistener,50000 -E -d dbname -K ReadOnly

select @@SERVERNAME

go

Any one have this issue to resolution .

Many thanks

 


Viewing all articles
Browse latest Browse all 4689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>