Skip to content

Instantly share code, notes, and snippets.

@torleifhalseth
Last active August 29, 2015 14:09
Show Gist options
  • Save torleifhalseth/26c52a9d8e669029a410 to your computer and use it in GitHub Desktop.
Save torleifhalseth/26c52a9d8e669029a410 to your computer and use it in GitHub Desktop.

###Managing Database Logins -- first, connect to the master database ####Create Login

CREATE LOGIN login1 WITH password='<ProvidePassword>';

Strong Password Generator

####Create User Remember to run the queries below on the actual database (Right click the database and select "New Query")

CREATE USER login1User FROM LOGIN login1;

####Assign SQL Database Server-Level Roles

EXEC sp_addrolemember 'db_owner', 'login1User';

###Tools SQL Database Migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment