Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have SQL Server 2005 on my local machine. During the studies of SQL Server network configuration, I logged into my SQL Server Instance and ran the following script:

USE Master;


After that I am unable to login. I can't even login using Windows authentication.

How can I revert the change above? Is there any another way to fix this situation?

share|improve this question
Can you try restarting the SQL server services? It might help. – Sky Sep 5 '12 at 12:34
Yes, I have tried this..but still the problem exist.. – JP Chauhan Sep 5 '12 at 13:06
up vote 4 down vote accepted

STATE = STOPPED on the [TSQL Default TCP] endpoint prevents the SQL Server service from listening for incoming connections via TCP. You have several options available that will allow you to reverse this.

  1. Connect with the DAC dedicated admin connection. You can connect to the DAC by specifying the name of the server as: ADMIN:MyServerName. Once connected to the DAC, you should be able to start the endpoint again with the following statement:

    ALTER ENDPOINT[TSQL Default TCP] state = started;
  2. Use named pipes to connect to SQL server. Use SQL Server Configuration Manager to enable named pipes if disabled.

share|improve this answer

Can you edit your post to include the exact error message you are getting?

It sounds like your sa account is completely locked out. If that is the case you may need to install a new instance of SQL Server 2005 and connect all of your databases back to it.

share|improve this answer
I tried but problem still exist. In error log Message: " Error: 17813, Severity: 20, State: 1. The requested service has been stopped or disabled and is unavailable at this time. The connection has been closed. [CLIENT:] " and during connection from sqlcmd: "Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired. ". While connecting from Managment studio "Microsoft Error 64 reported" – JP Chauhan Sep 5 '12 at 13:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.