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.

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.

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

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

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.

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

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.

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.

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

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
- Advanced SQL Queries For Practice With Solution
- SQL Queries For Practice With Solution
- SQL Interview Questions and Answers
- STORED PROCEDURE in SQL Server
- How To Join Tables Data in SQL Server
- How to use Transaction in SQL Stored Procedure
- Difference Between IN and NOT IN Operators in SQL
- How To Modify Date in SQL Using DATEADD
- How To Get Year From Date in SQL Server
- How To Get Month From Date in SQL Server
- How To Get Day From Date in SQL Server
- How To Use ROW_NUMBER Function in SQL
- Date and Time Functions in SQL Server
- How To Find Nth Highest Salary in SQL Server
- How to Backup Table Using SELECT INTO Statement
- How To Use HAVING Clause in SQL Server
- Aggregate Functions in SQL Server
- How To Group Data Using Group By in SQL Server
- How To Truncate Table in SQL Server
- How To Delete Data From Table in SQL Server
- How To Update Table Data in SQL Server
- How To Sort Data Using Order By Clause in SQL
- How To Select Distinct Records in SQL Server
- How to Filter Data From Table in SQL Server
- Round Off Values Using Ceiling and Floor in SQL
- How To Find Square Root Of A Number in SQL Server
- How To Select Data From Table in SQL Server
- How To Insert Data in SQL Server Table
- How To Add NOT NULL Constraint in SQL Server
- How To Add Check Constraint on SQL Server Table
- How To Add Default Constraint on SQL Server Table
- Unique Key Constraint in SQL Server
- How to add Foreign Key Constraint in SQL Server
- How To Add Identity To SQL Server Table Column
- How to add Primary Key Constraint in SQL Server
- How To Create Alter and Drop Table in SQL Server
- How To Create Alter and Drop Database in SQL