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
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
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
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