Link to home
Start Free TrialLog in
Avatar of cheryl9063
cheryl9063Flag for United States of America

asked on

Deny Permissions On Multiple Roles in SQL

Below is the correct syntax to deny permissions on a role in a SQL Server database. How do you deny permissions to several roles.. Lets say the role names are: Role1, Role2 and Role 3
use Testdb;
DENY SELECT on database:: testdb
to Role1;
go

Open in new window

Avatar of cyberkiwi
cyberkiwi
Flag of New Zealand image

You have to fire multiple queries to do that, i.e.

DENY SELECT on database:: testdb to Role1;
DENY SELECT on database:: testdb to Role2;

etc
ASKER CERTIFIED SOLUTION
Avatar of cyberkiwi
cyberkiwi
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial