How to create users in MS SQL Server
The user here is an account on MS SQL Server to access the database (database).
The user here is an account on MS SQL Server to access the database (database).
Users can be created in 1 of 2 ways below.
Method 1: Use T-SQL
Syntax for creating users in MS SQL Server.
Create user for login
For example:
To create a user named TestUser with the login name TestLogin on TestDB database , run the query below.
create user TestUser for login TestLogin
Method 2: Use SQL Server Management Studio SSMS
Note: First, you need to create Login with any name before creating user account. Use Login as TestLogin.
Step 1 : Connect to SQL Server and expand the database directory. Then open the database named TestDB, where we will create user accounts, find the Security folder . Find the Users or Logins folder (on the new SQL Server version) and select New Login. Then the screen below will appear.
New user creation screen for MS SQL Server
Step 2: Enter the TestUser name for the username and select the Login name named TestLogin as shown below.
Create a new user account
Step 3: Click OK to finish. Refresh the folder, you will see the newly created username.
Successfully created new users on MS SQL Server
Previous article: How to recover the database in MS SQL Server
Next lesson: How to decentralize access in MS SQL Server
You should read it
- Create VPN Server on Windows 8
- How to decentralize users in MS SQL Server
- The CREATE USER command in SQL Server
- FUNCTION (Function) in SQL Server
- VIEW in SQL Server
- Instructions for setting up and managing FTP Server on Windows 10
- The difference between web server and app server
- Install Windows Server 2003 and create a backup server
- PROCEDURE (Procedure) in SQL Server
- How to create a VPN server on Windows without using software?
- Network basics: Part 3 - DNS Server
- How to create a database in MS SQL Server
Maybe you are interested
What happens when the Moon is close to Earth, at a distance of 420 km like the International Space Station (ISS) today? Invite to download the space theme wallpapers on the NASA XS inspired by NASA 5 familiar but dirty items on the plane 8 makeup tips to make you look 'more attractive' New technology to turn fossil fuels into products does not emit CO2 Terrifying scenario if the Earth lost oxygen in 5 seconds?