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

2 comments:

Anonymous said...

Thanks for you help.

Unknown said...

Thanks sir, it is working fine..

Docker Tutorial

 I have listed all the necessary commands of Docker below. In case if any is missing or if any improvement required, please share in comment...