How Do I Create a New User in a SQL Azure Database?

Had to look at a few different KB articles for this one so thought I'd throw all the steps together in one quick blog.

First you need to create a login, to do this, connect to the master database and run the following query:

  • CREATE LOGIN login1 WITH password='SuperSecretPassword';

Then connect to the Database you wish to give access to, you need to create the user, then supply the access.  Run the following scripts:

  • CREATE USER login1User FROM LOGIN login1;
  • EXEC sp_addrolemember 'db_owner', 'login1User';

Comments

Popular posts from this blog

How to Copy/Duplicate a Table and Columns in a Dataverse Environment

Export Group Membership From Active Directory Using Power Query

Microsoft Flow - Apply To Each Limitation (5000 items)