sergey efimov
sergey efimov

Reputation: 11

read-only intent in high availability replicas SQL server 2014

We have 2 sql server replicas in Always On cluster and when we tested for performance issues we saw that only the primary is working (read and write).

the primary is set to read-write and the secondary is set to read only intent, we want to send the simple select queries to the secondary replica, while the write queries will be sent to the primary.

is there a way to configure that without making 2 different services with 2 different connection strings for the 2 cases (first is read-write, the second is read-only).

Upvotes: 1

Views: 1329

Answers (1)

IanG
IanG

Reputation: 111

No, the distinction between read-only and read-write for an Availability Group happens at the connection level. To make the connection go to a Read-Only replica use ApplicationIntent=ReadOnly in the connection string.

Upvotes: 1

Related Questions