Ways to log in database on MS SQL Server
Logging in is a simple way to access SQL Server, as well as using your ID and password to log in to Windows or your email account. SQL Server has 4 types of login.
- According to Windows login information
- Specified specifically for SQL Server
- Created under Certificate certificate
- Created by Asymmetric Keys
This tutorial will only focus on how to log in with Windows Credentials and specify it for SQL Server.
Method 1 helps you log into SQL Server with your Windows username and password. If you want to create another username and password, use the second method.
To create, change or delete SQL Server login information, there are two ways
- Use SQL Server Management Studio
- Use T-SQL
Method 1: Log in to the database using SQL Server Management Studio
Step 1 : After connecting to SQL Server Instance, open the Logins folder as shown in the image below.
Open the Logins folder on SQL Server Management Studio
Step 2: Right-click Logins and select Newlogin, the screen below will appear.
Enter login information
Step 3: Enter the name and password, confirm the password again as shown in the image above and click OK. Then, new login information will be created as shown in the image below.
New login information created
Method 2: Log in the database using T-SQL Script
To create a login name of TestLogin and a password of P @ ssword, you only need to run 2 queries below.
Create login yourloginname with password='yourpassword'
Create login TestLogin with password='P@ssword'
Previous article: Managing MS SQL Server with Management Studio
Next article: How to create a database on MS SQL Server
You should read it
- CREATE LOGIN command in SQL Server
- DROP LOGIN command in SQL Server
- How to recover the database in MS SQL Server
- What is MS SQL Server?
- Database monitoring in MS SQL Server
- SQL Server 2019 - Microsoft Relational Database Management System
- How to Unlock SQL Server Account
- Instructions for installing SQL Server 2019
May be interested
- Manage MS SQL Server with Management Studiosql server management studio is a tool in sql server if you choose when installing.
- Instructions for installing MS SQL Serverthis is a step by step guide to installing ms sql server.
- Learn about the architecture of MS SQL Serverin the previous articles, you already know briefly about sql server, how to install sql server on the computer. in this section we will learn about the architecture of sql server.
- MS SQL Server versionssql server currently has many different versions. below is a list of versions with features of each version.
- What is MS SQL Server?this article will give you a general introduction to sql server, demonstrating the benefits and benefits of using sql server as well as existing versions.