Preventing Dropping of Schema Objects

  • Hi,

    I have created a database which has a schema called "Test". i have also created a role "Dev"

    Granted the necessary permission using the following statements

    GRANT SELECT ON SCHEMA::[Test] TO [Dev]

    GO

    GRANT ALTER ON SCHEMA::[Test] TO [Dev]

    GO

    GRANT DELETE ON SCHEMA::[Test] TO [Dev]

    GO

    GRANT EXECUTE ON SCHEMA::[Test] TO [Dev]

    GO

    GRANT INSERT ON SCHEMA::[Test] TO [Dev]

    GO

    GRANT REFERENCES ON SCHEMA::[Test] TO [Dev]

    GO

    GRANT UPDATE ON SCHEMA::[Test] TO [Dev]

    GO

    GRANT VIEW DEFINITION ON SCHEMA::[Test] TO [Dev]

    GO

    My issue here is that I want to prevent my developers from dropping/altering any tables at the same time they should be able to create/drop and alter procedures..

    With the current permissions the users are able to drop tables

    How do i do this. Please help

    Thanks

    Vinoj

  • they are SQL Logins or windows logins?

    If windows logins, you can add them to a group and give granular permission into the database

  • They are SQL logins. I have already added them to a new role

  • DDL Triggers. If they have ALTER, there's really no other way.

    K. Brian Kelley
    @kbriankelley

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

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