Server roles for Azure SQL Database: Database Management without admin-access

Published Sep 02 2021 04:31 PM 4,604 Views
Microsoft

Server roles for Azure SQL Database: Database Management without admin-access

 

Until now, in Azure SQL Database, to gain access to server-wide information like system-wide wait-stats, resource stats etc., the Server Admin or AAD Admin was the only account with sufficient permissions since server-level permissions are not grantable in SQL Database.

Today I am happy to announce that we are bringing built-in roles that in effect hold permissions applicable to all databases including databases residing in elastic pools a on a logical server for Azure SQL Database. This extends to the logical master-database which contains certain system-wide information. We are starting with 3 new roles:

  1. ##MS_DefinitionReader##
  2. ##MS_ServerStateReader##
  3. ##MS_ServerStateManager##

Benefit

The new server-roles that can be assigned to server logins to enable customers to assign and delegate job functions for server-wide metadata access and access to certain management commands without requiring Server Admin or AAD Admin privileges. This helps comply with the Principle of Least Privilege and implement role separation.

 

Technical background

Server-roles are not a new concept in the SQL Server universe, but for Azure SQL Database, our PaaS service offering, the server as such is just a logical concept. More on this here: What is a server in Azure SQL Database and Azure Synapse Analytics? | Microsoft Docs and Azure SQL databases in logical servers, elastic pools, and managed instances - Microsoft Tech Commun....

Because of this architectural difference, the same mechanics as for Managed Instance or SQL Server in a VM do not apply: Databases residing on the same logical server may not reside on the same physical server. This poses some challenges, but I am happy that we can bring an almost identical experience that works for the other Service offerings as well: Server level roles with permissions that have effects on any database on the logical server.

Each of these new server-roles includes a specific set of permissions. In SQL Database those permissions cannot be assigned individually on the server scope but using those roles one can grant them to a SQL Login. This is a new method to grant server permissions across a logical server and all databases hosted on that logical server in Azure SQL Database, aside from assigning Server/AAD Admin.

In the following let’s have a look at each role individually:

 

##MS_DefinitionReader##

The ##MS_DefinitionReader##-role predominantly will be useful for read-only server-auditing where an auditor will need to see the contents of static system metadata such as Login/principal names, Firewall settings, permissions of principals and of course object definition (code). It will often be combined with membership in the ##MS_ServerStateReader##-role.

It has VIEW ANY DEFINITION permission on the server, which covers and hence includes the VIEW DEFINITION permission on any database that a principal in that role has access to.

Here the results of sys.fn_my_permissions(NULL, 'SERVER') – called from the master-database and sys.fn_my_permissions(NULL, 'DATABASE') – called from a user-database:

AndreasWolter_6-1630624973250.jpeg

 

Members of the ##MS_DefinitionReader## fixed server role can read all catalog views that are covered by VIEW ANY DEFINITION, respectively VIEW DEFINITION on any database on which the member of this role has a user account.

 

##MS_ServerStateReader##

The ##MS_ServerStateReader##-role is ideal for read-only performance Monitoring and troubleshooting access. It will often be combined with membership in the ##MS_DefinitionReader##-role to see the actual names and definition (code) of objects involved.

It has VIEW SERVER STATE-permission on the Server which covers and hence includes the VIEW DATABASE STATE on any database that a principal in that role has access to.

Here the results of sys.fn_my_permissions(NULL, 'SERVER') – called from the master-database and sys.fn_my_permissions(NULL, 'DATABASE') – called from a user-database:

AndreasWolter_7-1630624973253.jpeg

 

Members of the ##MS_ServerStateReader## fixed server role can read all dynamic management views (DMVs) and functions that are covered by VIEW SERVER STATE, respectively VIEW DATABASE STATE on any database on which the member of this role has a user account.

This role allows querying several DMVs that exist solely in the master database such as sys.resource_stats that specifically contain information concerning the whole server, or sys.elastic_pool_resource_stats for all elastic pools on a logical server.

To make this role more useful and generally help customers comply with the Principle of Least Privilege and implement proper role-separation, we changed the permission requirements for several DBCC commands. Those formerly requiring elevated privileges are now covered by VIEW SERVER STATE – the permission which this role holds:

  • DBCC INPUTBUFFER()
  • DBCC SQLPERF (LOGSPACE)
  • DBCC SQLPERF (NETSTATS)

 

##MS_ServerStateManager##

The ##MS_ServerStateManager##-role is useful for delegating management tasks without requiring to assign full admin permissions.

It has ALTER SERVER STATE on the server. ALTER SERVER STATE also covers the VIEW SERVER STATE permission on the server and by that the VIEW DATABASE STATE on any database that a principal in that role has access to.

Here the results of sys.fn_my_permissions(NULL, 'SERVER') – called from the master-database and sys.fn_my_permissions(NULL, 'DATABASE') – called from a user-database:

AndreasWolter_8-1630624973257.jpeg

 

Members of the ##MS_ServerStateManager## fixed server role have the same permissions as the ##MS_ServerStateReader## role. In addition, it holds the ALTER SERVER STATE permission, which allows access to several management operations, such as: DBCC FREEPROCCACHEDBCC FREESYSTEMCACHE ('ALL'), DBCC SQLPERF():

  • DBCC FREEPROCCACHE;
  • DBCC FREESYSTEMCACHE ('ALL');
  • DBCC SQLPERF(); with the option to clear the wait- and latch-stats (this is only available on the master-database and has no effect on the wait-stats of the user databases which reside on different physical instances.)
    • DBCC SQLPERF("sys.dm_os_wait_stats", CLEAR);
    • DBCC SQLPERF("sys.dm_os_latch_stats", CLEAR);

 

Limitations

  • Role assignments may take up to 5 minutes to become effective. In addition, for existing sessions, changes to server role assignments do not take effect until the connection is closed and re-opened. This is due to distributed architecture between the master database and other databases on the same logical server.
    Partial workaround: to reduce the up to 5-minute waiting period and ensure that server role assignments are current in a database, a Server Admin/AAD Admin can run DBCC FLUSHAUTHCACHE in the user database(s) on which the login has access. Currently logged on users still have to reconnect after this for the membership-changes to take effect on them.

Further references:

 

Acknowledgement

Big kudos to all the team-members involved in this seemingly small addition that is much more complex than apparent: Maciej Szeszko, Steven Gott, Nikolas Ogg from engineering and Dimitri Furman for being a great helper and advisor

 

4 Comments
Senior Member

'These roles can be assigned to SQL Logins only – AAD Logins are not yet supported.'

 

Would that also explain why sys.fn_my_permissions is not returning any records at all?

Microsoft

Hi @Johannes_Vink 
Since you cannot have an AAD Login, it must be something else.
From which database are you running sys.fn_my_permissions and with which parameter?
In the article's screenshots the member is a SQL Login with an User Account in a User database from where I ran the function.
regards

Andreas

Occasional Visitor

Hi @AndreasWolter - Are there any plans to extend this to AAD logins/AAD integrated AD groups? It will be very useful to grant additional Server level accesses in a SQL DevOps setup.   

Microsoft

Hi @Foresight200102 

absolutely. I agree this is the ideal scenario.
The goal is to support AAD principals as well. But since these are server-level roles we first need Server scoped AAD Logins to be available first.

So we do have plans for sure, but I can't give a date here.
Thanks

Andreas

%3CLINGO-SUB%20id%3D%22lingo-sub-2714039%22%20slang%3D%22en-US%22%3EServer%20roles%20for%20Azure%20SQL%20Database%20Server%3A%20Database%20Management%20without%20admin-access%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2714039%22%20slang%3D%22en-US%22%3E%3CP%3E%3CFONT%20size%3D%227%22%3EServer%20roles%20for%20Azure%20SQL%20Database%20Server%3A%20Database%20Management%20without%20admin-access%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUntil%20now%2C%20in%20Azure%20SQL%20Database%2C%20to%20gain%20access%20to%20server-wide%20information%20like%20system-wide%20wait-stats%2C%20resource%20stats%20etc.%2C%20the%20Server%20Admin%20or%20AAD%20Admin%20was%20the%20only%20account%20with%20sufficient%20permissions%20since%20server-level%20permissions%20are%20not%20grantable%20in%20SQL%20Database.%3C%2FP%3E%0A%3CP%3EToday%20I%20am%20happy%20to%20announce%20that%20we%20are%20bringing%20built-in%20roles%20that%20in%20effect%20hold%20permissions%20applicable%20to%20all%20databases%20including%20databases%20residing%20in%20elastic%20pools%20a%20on%20a%20logical%20server%20for%20Azure%20SQL%20Database.%20This%20extends%20to%20the%20logical%20master-database%20which%20contains%20certain%20system-wide%20information.%20We%20are%20starting%20with%203%20new%20roles%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%23%23MS_DefinitionReader%23%23%3C%2FLI%3E%0A%3CLI%3E%23%23MS_ServerStateReader%23%23%3C%2FLI%3E%0A%3CLI%3E%23%23MS_ServerStateManager%23%23%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EBenefit%3C%2FP%3E%0A%3CP%3EThe%20new%20server-roles%20that%20can%20be%20assigned%20to%20server%20enable%20customers%20to%20assign%20and%20delegate%20job%20functions%20for%20server-wide%20metadata%20access%20and%20access%20to%20certain%20management%20commands%20without%20requiring%20Server%20Admin%20or%20AAD%20Admin%20privileges.%20This%20helps%20comply%20with%20the%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sql%2Fsecurity-the-principle-of-least-privilege-polp%2Fba-p%2F2067390%22%20target%3D%22_blank%22%3EPrinciple%20of%20Least%20Privilege%3C%2FA%3E%20and%20implement%20role%20separation.%3C%2FP%3E%0A%3CP%3ETechnical%20background%3C%2FP%3E%0A%3CP%3EServer-roles%20are%20not%20a%20new%20concept%20in%20the%20SQL%20Server%20universe%2C%20but%20for%20Azure%20SQL%20Database%2C%20our%20PaaS%20service%20offering%2C%20the%20server%20as%20such%20is%20just%20a%20logical%20concept.%20More%20on%20this%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-sql%2Fdatabase%2Flogical-servers%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EWhat%20is%20a%20server%20in%20Azure%20SQL%20Database%20and%20Azure%20Synapse%20Analytics%3F%20%7C%20Microsoft%20Docs%3C%2FA%3E%20and%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sql%2Fazure-sql-databases-in-logical-servers-elastic-pools-and-managed%2Fba-p%2F386145%22%20target%3D%22_blank%22%3EAzure%20SQL%20databases%20in%20logical%20servers%2C%20elastic%20pools%2C%20and%20managed%20instances%20-%20Microsoft%20Tech%20Community%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3EBecause%20of%20this%20architectural%20difference%2C%20the%20same%20mechanics%20as%20for%20Managed%20Instance%20or%20SQL%20Server%20in%20a%20VM%20do%20not%20apply%3A%20Databases%20residing%20on%20the%20same%20logical%20server%20may%20not%20reside%20on%20the%20same%20physical%20server.%20This%20poses%20some%20challenges%2C%20but%20I%20am%20happy%20that%20we%20can%20bring%20an%20almost%20identical%20experience%20that%20works%20for%20the%20other%20Service%20offerings%20as%20well%3A%20Server%20level%20roles%20with%20permissions%20that%20have%20effects%20on%20any%20database%20on%20the%20logical%20server.%3C%2FP%3E%0A%3CP%3EEach%20of%20these%20new%20server-roles%20includes%20a%20specific%20set%20of%20permissions.%20In%20SQL%20Database%20those%20permissions%20cannot%20be%20assigned%20individually%20on%20the%20server%20scope%20but%20using%20those%20roles%20one%20can%20grant%20them%20to%20a%20SQL%20Login.%20This%20is%20a%20new%20method%20to%20grant%20server%20permissions%20across%20a%20logical%20server%20and%20all%20databases%20hosted%20on%20that%20logical%20server%20in%20Azure%20SQL%20Database%2C%20aside%20from%20assigning%20Server%2FAAD%20Admin.%3C%2FP%3E%0A%3CP%3EIn%20the%20following%20let%E2%80%99s%20have%20a%20look%20at%20each%20role%20individually%3A%3C%2FP%3E%0A%3CP%3E%23%23MS_DefinitionReader%23%23%3C%2FP%3E%0A%3CP%3EThe%20%23%23MS_DefinitionReader%23%23-role%20predominantly%20will%20be%20useful%20for%20read-only%20server-auditing%20where%20an%20auditor%20will%20need%20to%20see%20the%20contents%20of%20static%20system%20metadata%20such%20as%20Login%2Fprincipal%20names%2C%20Firewall%20settings%2C%20permissions%20of%20principals%20and%20of%20course%20object%20definition%20(code).%20It%20will%20often%20be%20combined%20with%20membership%20in%20the%20%3CEM%3E%23%23MS_ServerStateReader%23%23%3C%2FEM%3E-role.%3C%2FP%3E%0A%3CP%3EIt%20has%20%3CSTRONG%3EVIEW%20ANY%20DEFINITION%3C%2FSTRONG%3E%20permission%20on%20the%20server%2C%20which%20covers%20and%20hence%20includes%20the%20VIEW%20DEFINITION%20permission%20on%20any%20database%20that%20a%20principal%20in%20that%20role%20has%20access%20to.%3C%2FP%3E%0A%3CP%3EHere%20the%20results%20of%20sys.fn_my_permissions(NULL%2C%20'SERVER')%20%E2%80%93%20called%20from%20the%20master-database%20and%20sys.fn_my_permissions(NULL%2C%20'DATABASE')%20%E2%80%93%20called%20from%20a%20user-database%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22AndreasWolter_6-1630624973250.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F307822i1EDB49350A4614DD%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22AndreasWolter_6-1630624973250.jpeg%22%20alt%3D%22AndreasWolter_6-1630624973250.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMembers%20of%20the%26nbsp%3B%3CSTRONG%3E%23%23MS_DefinitionReader%23%23%3C%2FSTRONG%3E%26nbsp%3Bfixed%20server%20role%20can%20read%20all%20catalog%20views%20that%20are%20covered%20by%26nbsp%3B%3CSTRONG%3EVIEW%20ANY%20DEFINITION%3C%2FSTRONG%3E%2C%20respectively%26nbsp%3B%3CSTRONG%3EVIEW%20DEFINITION%3C%2FSTRONG%3E%26nbsp%3Bon%20any%20database%20on%20which%20the%20member%20of%20this%20role%20has%20a%20user%20account.%3C%2FP%3E%0A%3CP%3E%23%23MS_ServerStateReader%23%23%3C%2FP%3E%0A%3CP%3EThe%20%23%23MS_ServerStateReader%23%23-role%20is%20ideal%20for%20read-only%20performance%20Monitoring%20and%20troubleshooting%20access.%20It%20will%20often%20be%20combined%20with%20membership%20in%20the%20%3CEM%3E%23%23MS_DefinitionReader%23%23%3C%2FEM%3E-role%20to%20see%20the%20actual%20names%20and%20definition%20(code)%20of%20objects%20involved.%3C%2FP%3E%0A%3CP%3EIt%20has%20%3CSTRONG%3EVIEW%20SERVER%20STATE%3C%2FSTRONG%3E-permission%20on%20the%20Server%20which%20covers%20and%20hence%20includes%20the%20VIEW%20DATABASE%20STATE%20on%20any%20database%20that%20a%20principal%20in%20that%20role%20has%20access%20to.%3C%2FP%3E%0A%3CP%3EHere%20the%20results%20of%20sys.fn_my_permissions(NULL%2C%20'SERVER')%20%E2%80%93%20called%20from%20the%20master-database%20and%20sys.fn_my_permissions(NULL%2C%20'DATABASE')%20%E2%80%93%20called%20from%20a%20user-database%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22AndreasWolter_7-1630624973253.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F307823i9F4510261998ECC1%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22AndreasWolter_7-1630624973253.jpeg%22%20alt%3D%22AndreasWolter_7-1630624973253.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMembers%20of%20the%26nbsp%3B%3CSTRONG%3E%23%23MS_ServerStateReader%23%23%3C%2FSTRONG%3E%26nbsp%3Bfixed%20server%20role%20can%20read%20all%20dynamic%20management%20views%20(DMVs)%20and%20functions%20that%20are%20covered%20by%26nbsp%3B%3CSTRONG%3EVIEW%20SERVER%20STATE%3C%2FSTRONG%3E%2C%20respectively%26nbsp%3B%3CSTRONG%3EVIEW%20DATABASE%20STATE%3C%2FSTRONG%3E%26nbsp%3Bon%20any%20database%20on%20which%20the%20member%20of%20this%20role%20has%20a%20user%20account.%3C%2FP%3E%0A%3CP%3EThis%20role%20allows%20querying%20several%20DMVs%20that%20exist%20solely%20in%20the%20master%20database%20such%20as%20%3CEM%3Esys.resource_stats%3C%2FEM%3E%20that%20specifically%20contain%20information%20concerning%20the%20whole%20server%2C%20or%20%3CEM%3Esys.elastic_pool_resource_stats%3C%2FEM%3E%20for%20all%20elastic%20pools%20on%20a%20logical%20server.%3C%2FP%3E%0A%3CP%3ETo%20make%20this%20role%20more%20useful%20and%20generally%20help%20customers%20comply%20with%20the%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sql%2Fsecurity-the-principle-of-least-privilege-polp%2Fba-p%2F2067390%22%20target%3D%22_blank%22%3EPrinciple%20of%20Least%20Privilege%3C%2FA%3E%20and%20implement%20proper%20role-separation%2C%20we%20changed%20the%20permission%20requirements%20for%20several%20DBCC%20commands.%20Those%20formerly%20requiring%20elevated%20privileges%20are%20now%20covered%20by%20VIEW%20SERVER%20STATE%20%E2%80%93%20the%20permission%20which%20this%20role%20holds%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EDBCC%20INPUTBUFFER()%3C%2FLI%3E%0A%3CLI%3EDBCC%20SQLPERF%20(LOGSPACE)%3C%2FLI%3E%0A%3CLI%3EDBCC%20SQLPERF%20(NETSTATS)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%23%23MS_ServerStateManager%23%23%3C%2FP%3E%0A%3CP%3EThe%20%23%23MS_ServerStateManager%23%23-role%20is%20useful%20for%20delegating%20management%20tasks%20without%20requiring%20to%20assign%20full%20admin%20permissions.%3C%2FP%3E%0A%3CP%3EIt%20has%20%3CSTRONG%3EALTER%20SERVER%20STATE%3C%2FSTRONG%3E%20on%20the%20server.%20ALTER%20SERVER%20STATE%20also%20covers%20the%3CSTRONG%3E%20VIEW%20SERVER%20STATE%3C%2FSTRONG%3E%20permission%20on%20the%20server%20and%20by%20that%20the%20VIEW%20DATABASE%20STATE%20on%20any%20database%20that%20a%20principal%20in%20that%20role%20has%20access%20to.%3C%2FP%3E%0A%3CP%3EHere%20the%20results%20of%20sys.fn_my_permissions(NULL%2C%20'SERVER')%20%E2%80%93%20called%20from%20the%20master-database%20and%20sys.fn_my_permissions(NULL%2C%20'DATABASE')%20%E2%80%93%20called%20from%20a%20user-database%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22AndreasWolter_8-1630624973257.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F307825i4C7ADE01B367FDBA%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22AndreasWolter_8-1630624973257.jpeg%22%20alt%3D%22AndreasWolter_8-1630624973257.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMembers%20of%20the%26nbsp%3B%3CSTRONG%3E%23%23MS_ServerStateManager%23%23%3C%2FSTRONG%3E%26nbsp%3Bfixed%20server%20role%20have%20the%20same%20permissions%20as%20the%26nbsp%3B%3CSTRONG%3E%23%23MS_ServerStateReader%23%23%3C%2FSTRONG%3E%26nbsp%3Brole.%20In%20addition%2C%20it%20holds%20the%26nbsp%3B%3CSTRONG%3EALTER%20SERVER%20STATE%3C%2FSTRONG%3E%26nbsp%3Bpermission%2C%20which%20allows%20access%20to%20several%20management%20operations%2C%20such%20as%3A%26nbsp%3B%3CEM%3EDBCC%20FREEPROCCACHE%3C%2FEM%3E%2C%26nbsp%3B%3CEM%3EDBCC%3C%2FEM%3E%20%3CEM%3EFREESYSTEMCACHE%20('ALL')%2C%3C%2FEM%3E%26nbsp%3B%3CEM%3EDBCC%20SQLPERF()%3C%2FEM%3E%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EDBCC%20FREEPROCCACHE%3B%3C%2FLI%3E%0A%3CLI%3EDBCC%20FREESYSTEMCACHE%20('ALL')%3B%3C%2FLI%3E%0A%3CLI%3EDBCC%20SQLPERF()%3B%20with%20the%20option%20to%20clear%20the%20wait-%20and%20latch-stats%20(this%20is%20only%20available%20on%20the%20master-database%20and%20has%20no%20effect%20on%20the%20wait-stats%20of%20the%20user%20databases%20which%20reside%20on%20different%20physical%20instances.)%3CUL%3E%0A%3CLI%3EDBCC%20SQLPERF(%22sys.dm_os_wait_stats%22%2C%20CLEAR)%3B%3C%2FLI%3E%0A%3CLI%3EDBCC%20SQLPERF(%22sys.dm_os_latch_stats%22%2C%20CLEAR)%3B%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELimitations%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ERole%20assignments%20may%20take%20up%20to%205%20minutes%20to%20become%20effective.%20In%20addition%2C%20for%20existing%20sessions%2C%20changes%20to%20server%20role%20assignments%20do%20not%20take%20effect%20until%20the%20connection%20is%20closed%20and%20re-opened.%20This%20is%20due%20to%20distributed%20architecture%20between%20the%20master%20database%20and%20other%20databases%20on%20the%20same%20logical%20server.%3CBR%20%2F%3EPartial%20workaround%3A%20to%20reduce%20the%20up%20to%205-minute%20waiting%20period%20and%20ensure%20that%20server%20role%20assignments%20are%20current%20in%20a%20database%2C%20a%20Server%20Admin%2FAAD%20Admin%20can%20run%20DBCC%20FLUSHAUTHCACHE%20in%20the%20user%20database(s)%20on%20which%20the%20login%20has%20access.%20Currently%20logged%20on%20users%20still%20have%20to%20reconnect%20after%20this%20for%20the%20membership-changes%20to%20take%20effect%20on%20them.%3C%2FLI%3E%0A%3CLI%3EThese%20roles%20can%20be%20assigned%20to%20SQL%20Logins%20only%20%E2%80%93%20AAD%20Logins%20are%20not%20yet%20supported.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFurther%20references%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ELink%20to%20documentation%20for%20the%20new%20server-roles%20in%20Azure%20SQL%20DB%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-sql%2Fdatabase%2Fsecurity-server-roles%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EServer%20roles%20-%20Azure%20SQL%20Database%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Ft-sql%2Fdatabase-console-commands%2Fdbcc-flushauthcache-transact-sql%3Fview%3Dazuresqldb-current%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EDBCC%20FLUSHAUTHCACHE%20(Transact-SQL)%20-%20SQL%20Server%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-sql%2Fdatabase%2Flogical-servers%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EWhat%20is%20a%20server%20in%20Azure%20SQL%20Database%20and%20Azure%20Synapse%20Analytics%3F%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sql%2Fazure-sql-databases-in-logical-servers-elastic-pools-and-managed%2Fba-p%2F386145%22%20target%3D%22_blank%22%3EAzure%20SQL%20databases%20in%20logical%20servers%2C%20elastic%20pools%2C%20and%20managed%20instances%20-%20Microsoft%20Tech%20Community%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Ft-sql%2Fstatements%2Fgrant-database-permissions-transact-sql%3Fview%3Dsql-server-ver15%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EGRANT%20Database%20Permissions%20(Transact-SQL)%20-%20SQL%20Server%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sql%2Fsecurity-the-principle-of-least-privilege-polp%2Fba-p%2F2067390%22%20target%3D%22_blank%22%3EThe%20Principle%20of%20Least%20Privilege%20(POLP)%20-%20Microsoft%20Tech%20Community%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAcknowledgement%3C%2FP%3E%0A%3CP%3EBig%20kudos%20to%20all%20the%20team-members%20involved%20in%20this%20seemingly%20small%20addition%20that%20is%20much%20more%20complex%20than%20apparent%3A%20Maciej%20Szeszko%2C%20Steven%20Gott%2C%20Nikolas%20Ogg%20from%20engineering%20and%20Dimitri%20Furman%20for%20being%20a%20great%20helper%20and%20advisor%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2714039%22%20slang%3D%22en-US%22%3E%3CP%3EAnnouncing%20Server%20roles%20for%20Azure%20SQL%20Database%20Server%20for%20Database%20Management%20without%20admin-access%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2714039%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20SQL%20Database%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20SQL%20Security%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Sep 02 2021 11:43 PM
Updated by: