db_owner cannot grant select to database role?

  • I just received a screenshot of an error one of my developers encountered while attempting to grant select to a database role.

    "Grant failed for Table 'dbo.tablename'. (Microsoft.SqlServer.Smo)

    Additional Information:

    An exception occurred while executing a Transact-SQL statement or batch

    (Microsoft.SqlServer.ConnectionInfo)

    Cannot find the user 'DOMAIN\domainuser', because it does not exist or you do not have permission. (Microsoft SQL Server, Error: 15151)

    I verified the user is a member of the database db_owner role and asked him to try again. same results. I added his login to the db_securityadmin role and then he was able to successfully grant the permission to the role. I thought db_owner had unlimitted access to the database? why would I need to grant him both db_owner and db_securityadmin to perform this task?

  • So far as I can tell, you'll need to check if he's been denied any rights in that direction. Those would override the role.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Cannot find the user 'DOMAIN\domainuser'

    That seems to be the real issue. Are you sure the username wasn't mistyped and that it existed in the database as a user?

    K. Brian Kelley
    @kbriankelley

  • K. Brian Kelley (4/20/2011)


    Cannot find the user 'DOMAIN\domainuser'

    That seems to be the real issue. Are you sure the username wasn't mistyped and that it existed in the database as a user?

    That was my first thought, too, but if it worked when the other rights were assigned, I don't think that's the issue. Unless the script was changed and a typo fixed at the same time.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • It could also be the case where the SQL Server is having issues talking with the DCs. The application and system event logs would tell the story there.

    K. Brian Kelley
    @kbriankelley

  • thanks for the suggestions. I will follow up on this in a lab and share my findings...

Viewing 6 posts - 1 through 5 (of 5 total)

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