create a login - SQL Server

Professionaluser
Posted by Professionaluser under Sql Server category on | Points: 40 | Views : 945
Users require a login account to access SQL Server(Database Engine). By default, the administrator of the computer have full access to SQL Server.

If you want to have a less privileged user, you will have to create a new local Windows Authentication account on your computer. To do this, you must be an administrator on your computer. Then you will grant that new user access to SQL Server.

Create a new Windows account
1. Click Run in the Start menu, type %SystemRoot%\system32\compmgmt.msc /s , and then open the Computer Management program.
2. Create New User by right clicking on the Users under Local Users and Groups of System Tools.
3. In the User name box type ABC.
4.In the Password and Confirm password box, type a strong password, and then click Create to create a new local Windows user.

After creating Windows account by following above instructions, create Login for that user in SQL Server by executing the below query in Query Editor of SSMS.
CREATE LOGIN [computer_name\ABC]
FROM WINDOWS
WITH DEFAULT_DATABASE = [TestData];
GO

Comments or Responses

Login to post response