I want developers to go to secondary replica for running select queries. So, I'm testing this by connecting to SSMS and providing "ApplicationIntent=ReadOnly" under options->additional parameters.
But it is still going to Primary. I'm using below query to check which replica I'm connected to and it is showing as Primary. Please advise.
FROM sys.dm_hadr_availability_replica_states ars
INNER JOIN sys.availability_groups ag
ON ars.group_id = ag.group_id
AND ars.is_local = 1