You are currently viewing How To Create SQL Server Login

How To Create SQL Server Login

How To Create SQL Server Login

In this article “How to create login in SQL Server”, we will learn how we can create SQL Server Login on Server level with examples. Here screenshot of each step also shown as below.

Creating SQL Server Login

SQL Server Login is used to provide Server level access and permissions. Further that login can also be associated with specific users and grant them whole/partial permission to work with all or specific database(s).

By default public server role is granted to the login. The public server role can not be changed.

Step-I: Open SQL Server Management Studio and click on Connect button.

login3

Step-II: Right click on Security, move the cursor on New tab and then click on Login… button from the pop-up window as shown in the below image.

Create role step 2

OR

Expand Security tab by clicking on the + icon, and Right click on Logins, and click on New Login… button.

Create role step 2

Step-III: A login window will open as below.

create role 3

Step-IV: Follow the steps below

  • Provide the login name
  • Choose Windows Authentication or
  • SQL Server authentication and provide the password
  • Keep the checkboxes checked if you wish to Enforce password policy, password expiration and change of password at next login.
  • Choose the Default Database and Default language.
  • Click OK button.
login

SQL Server login created successfully.

You can check the created login by expanding the Security and Login tab as shown below.

login

Keep in your mind, that we simply created a login without assigning Server Role(Except public), User Mappings, Securables and changing Status.

So, we can only login SQL Server Management Studio by providing the role created and password. But nothing can be done with these credentials.

login

A new window will be shown for changing password, because we didn’t unchecked the checkboxes as show in Step-IV image.

Provide the New Password and Confirm Password and Click on OK button.

login

Your SQL Server instance will be logged in with the login that we created.

login

Since, we created SQL Server login with public Server role only and didn’t associated this login to any database and database role. So, we can’t do anything with this login only.

Recommended Readings

Buy Best Stationery Products in Pakistan

Piano Ballpoint Pen

Piano Ballpoint Pen

ORO Trimetal Pencil

ORO Trimetal

Dollar Clipper Pen

UHU 10×7 ml Pack of 10 PCs

UHU 10×7 ml Pack of 10 PCs

Glue Stick 8g Pack Of 12 PCs

Glue Stick 8g

Color Pencils Box of 12 PCs

Deer Multi Color Pencils