1

For Read-Only routing, rather than explicitly using "ApplicationIntent=ReadOnly" into our application connection string or for individual users to specify it in additional properties, can this be configured while creating a login?

For Example: Any user trying to connect to the instance should be routed to read-only replica, even if they don not provide "ApplicationIntent=ReadOnly" in their connection string.

Is this possible?

1 Answer 1

2

No. But you can disable their logins on the instance that normally hosts the primary replica and have them connect directly to an instance that normally hosts a read-only replica.

5
  • Thanks for your reply @David By what you say does it mean, we might have access to the secondary read-only replica is it? If it is so we can create the logins in read-only replica rather than the primary server? My understanding was we cannot access them, but, whatever logins we create in primary server only gets replicated in the read-only copy.
    – Venkat
    Nov 4, 2020 at 14:29
  • 1
    Logins are instance-level principals, and so are not replicated by the AG. Database Users are replicated. Nov 4, 2020 at 14:32
  • I do replicate the logins manually for the fail over DR instance, but I believe as per the below doc, by default, we have read-only instance/replicas which the connections hit when we provide "ApplicationIntent=ReadOnly". That is what I was not sure if we can make it a default setting docs.microsoft.com/en-us/azure/azure-sql/database/…
    – Venkat
    Nov 4, 2020 at 14:46
  • 1
    No. There's no way to force ReadIntent for particular users. Nov 4, 2020 at 15:47
  • Thanks for your inputs
    – Venkat
    Nov 4, 2020 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.