none
Cannot alter the login 'sa', because it does not exist or you do not have permission.

    Question

  • Msg 15247, Level 16, State 1, Line 3
    User does not have permission to perform this action.
    Msg 15247, Level 16, State 1, Procedure sp_addsrvrolemember, Line 29
    User does not have permission to perform this action.
    Msg 15151, Level 16, State 1, Line 2
    Cannot alter the login 'sa', because it does not exist or you do not have permission.
    Saturday, November 01, 2014 7:40 AM

Answers

All replies

  • What login are you using to alter the sa login? Are you logged in as a sysadmin? What property of the sa login are you trying to alter?

    Satish Kartan www.sqlfood.com

    Saturday, November 01, 2014 9:42 AM
  • The error messages are all quite clear, the login you are using don't have enough permissions to perform the Actions. Ask your DBA to do this or to grant you more permissions.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Monday, November 03, 2014 8:42 AM
  • Hi Chinnarasu,

    According to your error message, it seems that you want to modify the permissions of 'sa', right?

    This error had occurred because of insufficient rights. In SQL Server, 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 change the rights of SA user.

    So in you scenario, in order to avoid this issue. you can add the user to systemadmin role and then using the same user to modify the permissions of 'sa'.
    http://technet.microsoft.com/en-us/library/aa905197(v=sql.80).aspx

    Regards,


    Charlie Liao
    TechNet Community Support


    Friday, November 07, 2014 3:11 AM
    Moderator
  • Can someone please confirm:

    If the 'sa' account is the only account setup with sysadmin role, then one must login as the 'sa', in order to elevate another account to that level, or to change the 'sa' password?  Which is a nightmare if the Sql Server instance is local to one's PC and you forgot the 'sa' password.

    I'm stressing this because I was under the impression that a full windows administrator, logged in locally, running SSMS, was able to do, pretty much anything. That clearly is not the case.
    • Edited by Mark A. Pawelek Monday, July 23, 2018 12:08 PM Clarify original point.
    Monday, July 23, 2018 12:04 PM
  • If the 'sa' account is the only account setup with sysadmin role, then one must login as the 'sa', in order to elevate another account to that level, or to change the 'sa' password?  Which is a nightmare if the Sql Server instance is local to one's PC and you forgot the 'sa' password.

    Security is always a hassle.

    The statement is not 100% true, because there may be accounts that have been granted for instance CONTROL SERVER. Which certainly is legit. There may also be security holes created by make databases trustworthy etc. Which is less legit.

    I'm stressing this because I was under the impression that a full windows administrator, logged in locally, running SSMS, was able to do, pretty much anything. That clearly is_not_ the case.

    This is also almost true. And there is a good reason for it: the Windows administrator should by default not have full permission to somehing he might have no business to.

    However, if you start SQL Server in single-user mode, you can access SQL Server as sysadmin if you are logged in as a Windows administrator.

    By the way, when you installed SQL Server, you should have been prompted to specify a Windows login to be sysadmin.

    Monday, July 23, 2018 9:20 PM