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).
To create a database user using SQL Server Management Studio
-
In SQL Server Management Studio, open Object Explorer and expand the Databases folder.
-
Expand the database in which to create the new database user.
-
Right-click the Security folder, point to New, and then click User.
-
On the General page, enter a name for the new user in the User name box.
-
In the Login name box, enter the name of a SQL Server login to map to the database user.
-
Click OK.
To create a database user using Transact-SQL
-
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
-
Create the user by executing the following Transact-SQL command: CREATE USER <new user name> FOR LOGIN <login name> ; GO
Tasks
How to: Create a Database Schema
How to: Create a SQL Server Login
Concepts
Identity and Access Control (Database Engine)
Principals (Database Engine)
Securing SQL Server
Other Resources
Managing Logins, Users, and Schemas How-to Topics
CREATE USER (Transact-SQL)
sys.database_principals (Transact-SQL)
Help and Information
Getting SQL Server 2008 Assistance