User Tools

Site Tools


wiki:connect_azure_database

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:connect_azure_database [2024/04/25 13:14] – created antisawiki:connect_azure_database [2024/05/06 14:45] (current) – [Read-only user] Move EXEC sp_addrolemember... cmd antisa
Line 19: Line 19:
 **4.** Switch to DB (e.g. somedb_DEV) to which you need access and create user **4.** Switch to DB (e.g. somedb_DEV) to which you need access and create user
   CREATE USER rouser FROM LOGIN my_readonlylogin;   CREATE USER rouser FROM LOGIN my_readonlylogin;
 +
 +Add read permissions to user
 +  EXEC sp_addrolemember 'db_datareader', 'rouser';
  
 You need to repeat this step for each DB. You need to repeat this step for each DB.
Line 25: Line 28:
   SELECT * FROM sys.sysusers;   SELECT * FROM sys.sysusers;
  
-Add read permissions to user (needed only once) 
-  EXEC sp_addrolemember 'db_datareader', 'rouser'; 
  
 Now use  my_readonlylogin as user to login not the user created :shrug: Under database field select the database as well otherwise the default is to connect to master DB. Now use  my_readonlylogin as user to login not the user created :shrug: Under database field select the database as well otherwise the default is to connect to master DB.
wiki/connect_azure_database.txt · Last modified: 2024/05/06 14:45 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki