A. Agius
A. Agius

Reputation: 1271

GRANT VIEW on 1 database

Is there any work around to grant view on a particular database after executing the below code?, I am using MS SQL 2008 RC2.

REVOKE VIEW ANY DATABASE FROM <login>;

Thanks

Upvotes: 1

Views: 3985

Answers (1)

Aaron Bertrand
Aaron Bertrand

Reputation: 280570

As far as I know, REVOKE wins, so you may need to grant VIEW ANY and then deny on all of the other databases individually. This is less fun of course but you can automate this without having to do it one by one.

Upvotes: 3

Related Questions