SQL Server 2016: Create a Database User
In SQL Server, you can create a database user to allow different users or processes access to a particular database.
Even though we have just created a login that can successfully connect to SQL Server, that login still can't access our Music database.
This is because we haven't yet associated that login with a database user.
There are four things you need to do in order to provide access to a database:
- Create a login (done)
- Create a database user (on the database that the user needs to access).
- Associate that user with the login.
- Specify the level of access the user is authorized for.
Launch the Database User Dialog Box
Create the User
Test the User
Apply a Role
We'll now add the user to a database-level role. The role we choose will determine the level of access the user has within the database.
Launch the Database User Properties Box
Select a Role
Refresh the Object Explorer