Skip to content

Instantly share code, notes, and snippets.

@aburok
Created May 30, 2018 12:08
Show Gist options
  • Save aburok/9517b0181d2d1ab19d82bb2f15b6cf5f to your computer and use it in GitHub Desktop.
Save aburok/9517b0181d2d1ab19d82bb2f15b6cf5f to your computer and use it in GitHub Desktop.
Umbraco Azure SQL create user
-- =================================================
-- Create User as DBO template for Windows Azure SQL Database
-- =================================================
-- For login <login_name, sysname, login_name>, create a user in the database
-- EXECUTE THIS ON AZURE MASTER DATABASE
CREATE LOGIN [client-stg-umbraco-user] WITH password='xxx';
GO
-- EXECUTE THIS ON AZURE UMBRACO DATABASE
CREATE USER [client-stg-umbraco-user]
FOR LOGIN [client-stg-umbraco-user]
WITH DEFAULT_SCHEMA = [dbo]
GO
-- Add user to the database owner role
EXEC sp_addrolemember N'db_owner', N'client-stg-umbraco-user'
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment