Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Page History: Creating a Database User - SQL Azure

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: Mon, Apr 03, 2017, 2:03 PM


References


Procedure

1. Connect to your SQL Azure instance as an administrator to the MASTER database (That is, within SSMS Object Explorer, right-click the MASTER database and choose "New Query")

2. Execute the following script in the MASTER database

CREATE LOGIN MyUserName WITH PASSWORD=N'MyPassword'
GO
CREATE USER MyUserName FOR LOGIN MyUserName
GO
ALTER USER MyUserName WITH DEFAULT_SCHEMA=[dbo]
GO

3. Open a NEW QUERY against the application database

4. Execute the following script in the application database

CREATE USER MyUserName from LOGIN MyUserName
go
ALTER ROLE [db_datareader] ADD MEMBER MyUserName
GO
ALTER ROLE [db_datawriter] ADD MEMBER MyUserName
GO

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.