Created
October 28, 2017 13:58
-
-
Save vkhazin/5b713e962af3341bbf6037b7807df389 to your computer and use it in GitHub Desktop.
Create MS Sql Login and grant database ownership role
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE <db name> | |
CREATE LOGIN <login name> WITH PASSWORD = '<password>' | |
create user <login name> for login <login name> | |
exec sp_addrolemember 'db_owner', '<db name>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment