Search

Monday, December 16, 2013

Deleted all login from SQL Server and now unable to Login to SQL Server

Mistakenly I had deleted all logins from SQL Server and now unable to login to SQL Server. When I try to login I got below error.

Login failed for user '  domain\name'. (Microsoft SQL Server, Error: 18456)

To resolve the issues I follow below steps:

Click START - Run - cmd (Command Prompt)

Stop the sql server : NET STOP MSSQLSERVER

Now Start the sql server with single user mode from command prompt:

NET START MSSQLSERVER /m

Connect the SQL Server using the Windows Authentication. To find out the windows server name

  •      click start
  •      Right click on my computer
  •      Select properties
  •      computer name
If above steps are not working, connect SSMS with windows Authentication.

Create login and provide sysadmin rights.

Stop the sql server running the below command in command prompt.

NET STOP MSSQLSERVER

Start the sql server with multi user mode running the below command in command prompt

NET START MSSQLSERVER

No comments:

Post a Comment