07 – Adding A New User To A Database

In this post we will be explaining how to add a new user to your database.

Log in to your SQL Server and expand the Security node. Right-click on the Login file icon select New Login.

Screenshot 2014-02-07 12.29.04

Look at the image below.

1) Enter your login name in Login name (we are using TestLogin1).

2) Enter and confirm your password. We are using password1.

3) Uncheck User Must Change Password At Next Login

4) Click OK.

Screenshot 2014-02-07 13.17.55Having create a new login for the server, we will need to create a new user for the database (note: logins and users are not the same) and associate the login with the user. Confused? Just keep reading…

Choose the database you wish to create a new user for. In our case we have chosen TestDB.

Expand the TestDB node.

Expand the Security node.

Right-click on Users and select New User.

Screenshot 2014-02-07 12.21.02

You will get a new form open up (form 1 in the image below).

a) Choose a name for your user. We have chosen TestUser1.

b) We need to choose a Login name. Click on the ellipses button to the right of the Login name text box.

c) A new form (2) will open up. Click on Browse.

d) Another form (3) will open up. Find your newly create login and check the box.

e) Click OK.Screenshot 2014-02-07 12.22.39

You will now have [Testlogin1] in the text box below.

Click OK.Screenshot 2014-02-07 12.22.45

TestLogin1 will appear in the text box below.

Click OK.Screenshot 2014-02-07 12.22.50

Go to the database in the Object Explorer.

Select properties.Screenshot 2014-02-07 12.27.22

A new form will open.

Select Permissions from the left-hand menu.

Select TestUser1 from the list of users in the middle of the form.

Check the user permissions that you want your new user to have.

We have select insert, delete, update and execute.

Click OK.Screenshot 2014-02-07 12.43.57Ok, so we have added the user/login. Now we need to test it.

Click on File and choose Disconnect Object Explorer.

Screenshot 2014-02-07 12.31.37

Click on File again and this time choose Connect Object Explorer.Screenshot 2014-02-07 12.31.45

The standard form for connecting to the server will open up. Choose SQL Server Authentication from the Authentication drop down menu and enter your new login and password.Screenshot 2014-02-07 12.32.32

When the Object Explorer connects, widen it slightly and you will be able to see that you are logged in as the new user.Screenshot 2014-02-07 12.32.51

You will now be able to edit data in your chosen database.

Leave a Reply

Your email address will not be published. Required fields are marked *

Visit Us On TwitterVisit Us On FacebookVisit Us On Youtube