sysadmin role not recognized by some databases

  • This question is regarding a development VM I use.

    I installed SQL Server 2008 R2 Developer Edition to a VM that is not a part of any domain. I installed SQL Under a local Windows Account, let's call that LocalWinA, that was in the Administrators Group. I then realized that I needed to do my development work under a Windows Account of another name. I made such an account and added it to the Administrators Group. Let's call that LocalWinB. Within SQL Server, I gave LocalWinB the sysadmin role.

    However, when I log in to Windows as LocalWinB and use SQL Server, I cannot do things like drop databases or change database owners. I am denied permission.

  • Are you absolutely sure that you are logging in as the account that is sysadmin? Are you absolutely sure that it did get added to the sysadmin role?

    Double check your role membership, doublecheck the login name. It's worth noting that a member of local administrators is not sysadmin by default.

    A member of the sysadmin role cannot be denied any permissions.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I think Thursday I may have gone down the wrong path due to an error message leading me that way.

    The reality is yes, the account I am running as is sysadmin and I am now able to run sp_changedbowner with no problem.

    Thanks for the help.

  • From sp_changedbowner (SQL Server 2008 R2)

    This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use ALTER AUTHORIZATION instead.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply