Does a sysadmin login have permissions in all DB roles?

  • I think the answer is yes, but I want to confirm. Reason being someone wants our agent account to perform executions, which are given permission by a custom DB role. But in order to be added as a member to this role the agent account must be a user in the DB. Since the agent account is sysadmin on the box (for obvious reasons), they don't have a user entry. As a sysadmin the agent can do anything regardless of custom roles, correct? Just want to make sure.

    -------------------------------------------------------------------------------------------------
    My SQL Server Blog

  • yes you are correct.

    a sysadmin login can do everything.

    a login with sysadmin priviledges performs work at a database level is performed in the context of the user dbo , which is the special user that is part of every database in SQL.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • That's what I thought. Thanks.

    Doing some clean up on user databases...

    -------------------------------------------------------------------------------------------------
    My SQL Server Blog

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

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