Categories
Sql Server

How To Create Users In SQL Server

How To Create Users In SQL Server

In this tutorial you will learn that how to create user in SQL Server.To Do so follow the simple steps.

TSQL:-

create login [Demo] with password=N'DEMO', check_expiration=OFF, default_database=[master], check_policy=off
go
exec sp_addsrvrolemember @loginame=N'Demo', @rolename =N'serveradmin'
go


When you run the following query demo user will be crested in SQL Server, having password DEMO and role assigned t this user is serveradmin.

Visual Guide:-

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Click OK and User will be created.