TheBugSlayer
Programmer
Hi,
Can someone clearly explains what happens when a DENY clause is applied to a permission on a principal?
I am preparing for MCTS 70-432 and according to the book I am reading
You add permissions to an object with the GRANT statement. Access to an object is
prevented with the DENY statement. To access an object, permission must be granted explicitly.
Each time you issue a GRANT statement, SQL Server places an entry in a security table for the
corresponding permission granted. Each time you issue a DENY, an entry is placed in a security
table for the DENY. Because a DENY overrides any other permission, a DENY overrides a GRANT.
The REVOKE statement removes permission entries for the object referenced. For example,
if you issue a GRANT SELECT ON Person.Address TO Test, you can remove the access by
executing REVOKE SELECT ON Person.Address FROM Test. Similarly, if you issue DENY SELECT
ON Person.Address TO Test, you can remove the DENY by executing REVOKE SELECT ON
Person.Address FROM Test.
While I straighten out my install, here is a question I would like to ask: If you issue a DENY SELECT, the principal will not be able to select, OK. But if you did not explicitly GRANT SELECT on the principal, will it be able to select?
Can someone clearly explains what happens when a DENY clause is applied to a permission on a principal?
I am preparing for MCTS 70-432 and according to the book I am reading
You add permissions to an object with the GRANT statement. Access to an object is
prevented with the DENY statement. To access an object, permission must be granted explicitly.
Each time you issue a GRANT statement, SQL Server places an entry in a security table for the
corresponding permission granted. Each time you issue a DENY, an entry is placed in a security
table for the DENY. Because a DENY overrides any other permission, a DENY overrides a GRANT.
The REVOKE statement removes permission entries for the object referenced. For example,
if you issue a GRANT SELECT ON Person.Address TO Test, you can remove the access by
executing REVOKE SELECT ON Person.Address FROM Test. Similarly, if you issue DENY SELECT
ON Person.Address TO Test, you can remove the DENY by executing REVOKE SELECT ON
Person.Address FROM Test.
While I straighten out my install, here is a question I would like to ask: If you issue a DENY SELECT, the principal will not be able to select, OK. But if you did not explicitly GRANT SELECT on the principal, will it be able to select?