How to only access Azure SQL DB Read Replica, not primary

EUNJI SON 1 Reputation point Microsoft Employee
2023-07-06T07:12:42.51+00:00

Dear team.

we are aware that we can use the following option to connect to the Azure SQL DB read replica:

ApplicationIntent=ReadOnly

However, users who do not use this option are currently accessing the primary DB.

However, users who do not use this option are currently accessing the primary DB.

I would like to restrict certain users to only access the read replica.

Is there a way to force the ApplicationIntent=ReadOnly option for specific users?

Is there a way to force the ApplicationIntent=ReadOnly option for specific users?

Alternatively, are there any other methods to prevent specific users from accessing the primary DB and allow them to only access the read replica?

Thank you.

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. ShaktiSingh-MSFT 16,171 Reputation points
    2023-07-06T08:50:15.9533333+00:00

    Hi
    EUNJI SON
    •,

    Welcome to Micrsoft Q&A forum and thanks for using Azure Services.

    As I understand, you want to only access Azure SQL DB Read Replica, not primary.

    Users on the source server are replicated to the read replicas. You can only connect to a read replica using the user accounts available on the source server.

    Next you may refer to https://www.ozkary.com/2021/01/create-read-only-user-on-azure-sql.html#:~:text=To%20make%20this%20user%20read,the%20read%2Donly%20user%20account. for creating read only user for your Azure SQL DB Server.

    Let us know if this helps. Please reply if the ask is differently understood.

    Thank you.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.