SQL SERVER – Fix : Error : Msg 15151, Level 16, State 1, Line 2 Cannot alter the login ‘sa’, because it does not exist or you do not have permission

Msg 15151, Level 16, State 1, Line 2
Cannot alter the login ‘sa’, because it does not exist or you do not have permission.

Fix/Workaround/Solution:
This error had occurred because of insufficient rights. Please read my previous post here before reading further article.

SA is system admin user and it is the highest level of user in system. If any user have to modify the permissions of SA that user needs to have higher or equivalent rights as SA user. Users member of systemadmin group are can only change the rights of SA user.

First adding any user to systemadmin role and then using the same user to modify system admin’s tool will fix the issue.

i have problem with SQL Express 2008 R2 i have restore the database and connected the application it throws an exception like Stored procedure not found in that database all SPs and tables are present like this [mruser].[SPname] so it throws the exception

You must be an Administrator on the box to enable the SA user or other SysAdmin users. In addition to that, you probably need to run SQL Server Management Studio as an Administrator. Right click on the SQL Server Management Studio icon and select Run As Administrator. Once you do this and then attempt to enable the SA login, it should work.

Eric, I tried running SQL Server Mgmt Studio as an Administrator and got enabled the SA login perfectly. But now when I disconnect and try to connect using the SA login, it throws the following exception:

Community Initiatives

About Pinal Dave

Pinal Dave is a Pluralsight Developer Evangelist. He has authored 11 SQL Server database books, 17 Pluralsight courses and have written over 3200 articles on the database technology on his blog at a http://blog.sqlauthority.com. Along with 11+ years of hands on experience he holds a Masters of Science degree and a number of certifications, including MCTS, MCDBA and MCAD (.NET). His past work experiences include Technology Evangelist at Microsoft and Sr. Consultant at SolidQ. Follow @pinaldave
Send Author Pinal Dave
an email at pinal@sqlauthority.com

Email Subscription

Enter your email address to subscribe to this blog and receive notifications of new posts by email.