Skip to content

Instantly share code, notes, and snippets.

@masimplo
Created August 7, 2014 21:16
Show Gist options
  • Save masimplo/9d1db2a99bf439b22732 to your computer and use it in GitHub Desktop.
Save masimplo/9d1db2a99bf439b22732 to your computer and use it in GitHub Desktop.
Creating a db user in Azure MSSQL
- first, connect to the master database
CREATE LOGIN login1 WITH password='password';
- then connect to the database in question
CREATE USER login1User FROM LOGIN login1;
EXEC sp_addrolemember 'dbmanager', 'login1User';
EXEC sp_addrolemember 'loginmanager', 'login1User';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment