Grant DROP table permission to SQL id

  • How to grant DROP table permission within a database to an SQL login. I could see in Databae properties-> permission tab, there is an option to grant CREATE TABLE, EXECUTE permission etc, but not DROP table permission. How to grant it?

  • You won't be able to get that granular from my experience. You will have to give more broad access to a database.

  • Create a stored proc to with constraints to limit what someone can drop. Add EXECUTE AS OWNER to the proc and then give the user permissions just to run the proc.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • balasach82 (3/26/2015)


    How to grant DROP table permission within a database to an SQL login. I could see in Databae properties-> permission tab, there is an option to grant CREATE TABLE, EXECUTE permission etc, but not DROP table permission. How to grant it?

    To drop a table, the user needs either CONTROL on the table, or ALTER on the schema like so

    GRANT CONTROL ON OBJECT::[dbo].[bob] TO [someuser]

    GRANT ALTER ON SCHEMA::[dbo] TO [someuser]

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

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

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