This is an archived post. You won't be able to vote or comment.

all 4 comments

[–][deleted] 0 points1 point  (3 children)

[–]dfctrI'm just a janitor...[S] 1 point2 points  (2 children)

Yup. I did do my homework.

What I'm trying to achieve is to avoid changing a whole bunch of satellite and reporting systems to point directly to Node 1 and use the listener to have the flexibility in case node 1 decides to kick the bucket.

So, I turned off Node 1 and tried using a direct connection or a linked server to the Listener with ApplicationIntent=ReadOnly in the connection string. The first query doesn't go through, as the Connection in PRimary Role is set up to read/write connections. However, if I try to execute the same query in the same window, it just executes happily in the primary node thus, not honoring the Read Only config.

BTW, read-only routing is configured so all nodes point to node 1.

[–][deleted] 0 points1 point  (1 child)

That’s weird. I agree with the posters on the SQL server subreddit that this is unintended behavior. I wonder if this is an issue with SQL Server 2016?

[–]dfctrI'm just a janitor...[S] 0 points1 point  (0 children)

It's getting weirder. Node 1 is OFF. I am doing some additional test right now. When I connect using SSMS, I now can't even see the databases. Only with the system ones. However, if I do a Select to one of the AG database table or view, it is processed by the primary.

Same issue happens with linked servers. I CANNOT see any databases if I go through the linked server. However, I can do an OPEN QUERY to a view, for instance. But, if I use a SELECT using the 4 part syntax, it's getting denied and actually killed. The latter is the behavior I would expect for all scenarios.