Search This Blog

Friday, December 22, 2017

Creating Azure SQL Login and Assigning them permission

Creating Read-Only Users on Azure SQL

If you have admin rights please follow the following steps to create a read-only or a user with login who can just run select queries on azure sql.

1. Login to the Database Server as Admin and Select Master Database and run the following queries

--This will create a Login on the Server
CREATE LOGIN READ_USER WITH PASSWORD = 'StrongPassword';

2. Create User in the Database where the Read-Only permission is required

--Select the Database where you will be assigning the Read-only permission and run below command
CREATE USER READ_USER FROM LOGIN READ_USER ;

3. Assign db_datareader persmission to the user on the database

--Select the Database where you will be assigning read permission and run below query
EXEC sp_addrolemember 'db_datareader', 'READ_USER ';

Reference : https://azure.microsoft.com/en-us/blog/adding-users-to-your-sql-azure-database/

1 comment:

  1. Did you hear there is a 12 word phrase you can speak to your partner... that will trigger intense emotions of love and impulsive attractiveness to you buried inside his chest?

    Because hidden in these 12 words is a "secret signal" that fuels a man's impulse to love, please and look after you with his entire heart...

    =====> 12 Words Who Trigger A Man's Desire Instinct

    This impulse is so built-in to a man's mind that it will drive him to work better than before to love and admire you.

    As a matter of fact, triggering this mighty impulse is so binding to having the best possible relationship with your man that the moment you send your man one of the "Secret Signals"...

    ...You will immediately notice him expose his mind and soul to you in a way he never expressed before and he'll perceive you as the only woman in the galaxy who has ever truly appealed to him.

    ReplyDelete