locked
The database principal has granted or denied permissions to objects in the database and cannot be dropped RRS feed

  • Question

  • Hi All,

    I'm having an issue removing an account from a database. I get the following error:

    The database principal has granted or denied permissions to objects in the database and cannot be dropped

    how can i drop this user account?

    Thursday, September 14, 2017 2:48 PM

Answers

  • I would expect that this query returns rows:

    SELECT * FROM sys.database_permissions WHERE grantor_principal_id = user_id('this_account')

    That is, this account has granted other users permissions, and you will need to review these permissions before proceeding.

    Thursday, September 14, 2017 9:26 PM

All replies

  • Seems the user is owner of schema and/or other object; you have to change the owner to a different DB user before you can drop it.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Thursday, September 14, 2017 5:21 PM
  • I would expect that this query returns rows:

    SELECT * FROM sys.database_permissions WHERE grantor_principal_id = user_id('this_account')

    That is, this account has granted other users permissions, and you will need to review these permissions before proceeding.

    Thursday, September 14, 2017 9:26 PM