SQL Server Performance

how to deny permission on mutilple objects at once

Discussion in 'Contribute Your SQL Server Scripts' started by manojbandha, May 1, 2006.

  1. manojbandha New Member

    Hey

    can anyone help me in writing script that how we can deny permission on mutilple objects at once

    suppose there is a user A and we want to deny permission for update,delete from every table in the database. do you have nay idea please
    i tried:

    declare @user varchar(100)
    set @user = 'A'
    DENY 'SELECT, INSERT, UPDATE, DELETE' on '[' + table_schema + '].[' + table_name + ']'to @user = 'A'

    go

    this didnot worked can you help please

    thanks a lot

Share This Page