Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
How can i create SQL Database User (for Multiple User from One Subscription) Microsoft Azure

What I have tried:

How can i create SQL Database User (for Multiple User from One Subscription) Microsoft Azure
Posted
Updated 25-Jul-16 6:11am

1 solution

You can either create Login or users for the purpose.
If you create a Login, then the login can access all the databases across that server.
You can use this T-SQL statement to create a Login
SQL
CREATE LOGIN readonlylogin WITH password='1234567';


Or you can create a user for the database. The TSQL is
SQL
CREATE USER readonlyuser FROM LOGIN readonlylogin; 


You can also set permission to the user by using following T-SQL
SQL
EXEC sp_addrolemember 'db_datareader', 'readonlyuser';
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900