Sql-server – Login permission on Availability group database

availability-groupsloginspermissionssql serversql server 2014

We have an availability group database. Just wanted to check on the below statement whether it needs to be run on all replica (By failing over and making it primary)or it can be run on the primary and the permission will be replicated to the replicas.

GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE, VIEW DEFINITION ON [DB_Lock] TO sqlogin

SQLOGIN is a sql login and has been mapped to the availability group database user.

DB_Lock is a table on the Availability group database. Thanks for the help!

Best Answer

If the database is in high availability group, then No, you do not need to failover, once you do it on the primary replica, it will be picked up and replicated to to other secondary replicas. Of course, we assume the sql login exists already on all replicas.