Search This Blog

Wednesday, February 2, 2011

SQL Server Login failed for user 'domain\Administrator'


SQL Login failed for user 'domain\Administrator' or 'sa' or any other user.
This happens for a lot of reason, one of the reasons may be, you have changed the domain controller of your server, where SQL was already installed.
When this happens, you cannot login to the SQL server with any account.
Then the resolution would be running the SQL instance in single-user mode.
How to do this , follow the below steps :
  1. In SQL Server Configuration Manager, click SQL Server Services.
  2. In the right pane, right-click SQL Server (<instance_name>), and then click Properties.
  3. On the Advanced tab, in the Startup Parameters box, type the parameters separated by semicolons (;).
    For example, to start in single-user mode, insert -m; in front of the existing startup options, and then restart the database. (When you start SQL Server in single-user mode, first stop SQL Server Agent. Otherwise, SQL Server Agent might connect first and prevent you from connecting as a second user.)
    Important noteImportant note: "After you are finished using single-user mode, you must remove the -m; from the Startup Parameters box before you can restart the server instance in the normal multi-user mode. "
  4. Click OK.
  5. Restart the Database Engine.
 Now when you have logged in to the SQL management studio, follow the below steps:
1. Expand the security node.
2. Right click on logins, create a new login for the new domain account.
3. Also, you can reset the SA password.

There you go, now your SQL server works fine.

Hope this hepls.

1 comment:

  1. thank you this worked for me. starting the service with the -m parameter in the command line did not work.

    ReplyDelete