/create-login.sql Secret
Created
April 11, 2016 11:15
Star
You must be signed in to star a gist
Azure SQL Pro Tip - Creating Login Account and User
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
IF EXISTS(SELECT * FROM sys.database_principals WHERE name = '<LOGIN_ACCOUNT>') | |
DROP USER [<LOGIN_ACCOUNT>] | |
DROP LOGIN [<LOGIN_ACCOUNT>] | |
GO | |
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'<LOGIN_ACCOUNT>') | |
CREATE LOGIN [<LOGIN_ACCOUNT>] WITH PASSWORD=N'<ACCOUNT_PASSWORD>' | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment