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.
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.
Having 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.
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.
You will now have [Testlogin1] in the text box below.
TestLogin1 will appear in the text box below.
Go to the database in the Object Explorer.
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.Ok, so we have added the user/login. Now we need to test it.
Click on File and choose Disconnect Object Explorer.
Click on File again and this time choose Connect Object Explorer.
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.
When the Object Explorer connects, widen it slightly and you will be able to see that you are logged in as the new user.
You will now be able to edit data in your chosen database.