Search code examples
azure-sql-database

Can we create custom db role at logical server level in Azure SQL DB?


I have a Logical Azure SQL Server that houses multiple Azure SQL databases.

Is it possible to create any custom db role at the logical server level?

Through this role, I want to grant read-only permission on all Azure SQL databases belonging to the logical SQL Server.


Solution

  • No. You cannot do that because Roles are database-level securables. In addition, in Azure SQL Database, the server is a logical concept and permissions can't be granted on a server level.

    Only the permissions that are held by fixed server-level roles can propagate to database permissions.