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

SQL server AOAG

$
0
0

Hi,

We have configured AOAG with one secondary replica (Read-only option=YES).

I have given read & write access to the application user on primary DB. I can’t give it on secondary as it is a read-only copy.

One application is able to connect to the primary by using listener hostname at connection string without any issues.

Another application wants to use the secondary replica for only read statements. Hence, we are using secondary hostname at connection string. We are able to connect to the secondary server name by using SQL login. However, DB is not accessible. How to access the secondary DB with a SQL login?

I guess AOAG works as follows.

If we keep option: Read-only=YES, and at connecting string if you mention listener name and applicationintent=readonly, the AOAG will connect to secondary replica automatically when we run select statements. If it is yes, how to we will come to know that it is using secondary or primary.

Please correct me if I am wrong.



Viewing all articles
Browse latest Browse all 4689

Trending Articles



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