User access on Azure SQL DB secondary replicas

Vijay Kumar 2,031 Reputation points
2022-05-09T18:48:21.757+00:00

Hi Team,

Next week we are planning to create an Azure SQL DB secondary replica at (US East) Primary at US West.

Is it necessary to manually sync logins and assign permissions at the Secondary replica from the primary or is it automatic?
I mean how to make sure that user logins and their permissions are same on both primary and secondary.

Azure SQL Database
0 comments No comments
{count} vote

Accepted answer
  1. Alberto Morillo 33,421 Reputation points MVP
    2022-05-09T20:19:15.347+00:00

    Logins that were created at the server level (master database) and then were used to create users at the database level, you will find the users are replicated, but the server login (at the master database) won't exist on the secondary region and will have to be manually recreated on the logical server at the secondary region.

    However, contained database users are replicated and exist on the secondary replicas of user databases. For this and many reasons it is a good choice to create contained database users on Azure SQL.


1 additional answer

Sort by: Most helpful
  1. Oury Ba-MSFT 17,791 Reputation points Microsoft Employee
    2022-05-09T21:13:34.09+00:00

    @Vijay Kumar As @Alberto Morillo mentioned you could have different permissions. It is not automatically sync. You have to do it manually.

    Regards,
    Oury

    0 comments No comments