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
- How to choose a database in MS SQL Serveryou can select the database to manipulate in one of the ways below.
- Compare the performance of MongoDB and SQL Server 2008in the following article, we will point out the difference in performance of the relatively new database management system, which is mongodb and one of the popular systems like sql server (mysql or oracle). most of the data is given here in the form of charts, so we can easily imagine the advantages and disadvantages of mongodb as well as other database management systems.
- Microsoft Windows PowerShell and SQL Server 2005 SMO - Part 10in part 10, i will show you how to use powershell scripts in conjunction with smo and parameters to create sql server scripts. creating sql server scripts is an important task for administrators and sql server database development professionals.
- Use and manage Database Mailsql server 2005 has a small mail system called database mail. as an improved feature in sql mail compared to earlier versions of sql server, database mail is a mail queue system. email messages are stored in an internal queue
- Restore SQL Server from Transaction Logtransaction log (also known as database log or binary log) is an action history that is executed by the database system to ensure acid properties when the system fails.
- How to install SQL Server databaseone of the most important things you must do in sql server 2008 is to install data and log files
- How to create users in MS SQL Serverthe user here is an account on ms sql server to access the database (database).
- Upload multiple XML files into XML data type columnssql server database administrators often have some needs such as importing multiple files into a table in the database. this article will discuss how to upload multiple files (especially xml files) into the xml data column of the sql server database.
- Secure programming of Access databasealmost everyone who uses a microsoft access application uses one of the (or all) of the following ways to protect the database (database), to lock their hands and lock the curious employees:
- Attach database in Microsoft SQL Server 2008this article will illustrate the different usage methods of the 'for attach' clause to overcome the limitations encountered when using sp_attach_db and sp_attach_single_file_db.