Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Database Engine
Principals
 How to: Create a Database User
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
Other versions are also available for the following:
SQL Server 2008 Books Online (November 2009)
How to: Create a Database User

This topic shows how to create a database user mapped to a SQL Server login. The topic assumes that a corresponding SQL Server login already exists. For information about creating a SQL Server login, see Principals (Database Engine).

  1. In SQL Server Management Studio, open Object Explorer and expand the Databases folder.

  2. Expand the database in which to create the new database user.

  3. Right-click the Security folder, point to New, and then click User.

  4. On the General page, enter a name for the new user in the User name box.

  5. In the Login name box, enter the name of a SQL Server login to map to the database user.

  6. Click OK.

  1. In Query Editor, connect to the database in which to create the new database user by executing the following Transact-SQL command: USE <database name> GO

  2. Create the user by executing the following Transact-SQL command: CREATE USER <new user name> FOR LOGIN <login name> ; GO

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker