Wednesday, February 1, 2012

Cannot use the special principal 'sa'. (Microsoft SQL Server, Error: 15405)

Yesterday, I start SQL Server 2005 and try to connect with sa user but was enable to connect with the 'sa' user and got this error:

Cannot use the special principal 'sa' (Microsoft SQL Server, Error: 15405)

After doing some google, I found out the solution which I am sharing so that others can get all the possible solutions from this article.

The titled message mean that your sa user is disabled. To enable it, you have to follow below mentioned steps:

1) you have to change the authentication mode: go to Management Studio and open Object Explorer. Connect to your server and right-click on the server name, then select Properties. Go to Security tab and under Server Authentication select "SQL Server and Windows Authentication Mode".

2) Also, after you follow the directions above, you will also need to explicitly enable the sa account as well. Go to Security->Logins. Right-click on the "sa" account, select "Properties". In the list on the left, select "Status" and under "Login" on the right, make sure "Enable" is selected.

3) exec sp_changedbowner 'sa','true' in query editor after selecting the database whom you want to assign user sa.

4) You can also change the password of sa (it's better to change the password).

After performing all above mentioned changes, Exit with SQL Management Studio. Restart Sql Service from services.msc.

Open Management Studio again and try to login "sa". Hopefully, it works. Enjoy!

(Please comment if it work for you).


Anonymous said...

Thanks for you help.

amit Jain said...

Thanks sir, it is working fine..

Difference Between Apache Common Logging and Log4J

Dear Folks, Log4j is a logging framework, i.e. it provides the code to log messages while Commons-logging is an abstraction layer for log...