Tuesday, 4 April 2017

System Privileges V/s Object Privileges

System Privileges:- system privileges as privileges that don't relate to a particular instance of an object. eg: create index ,create procedure etc Object Privileges:- For example granting SELECT on a specific table is an object privilege because it applies to a particular object based on the grant statement. However granting SELECT ANY TABLE is a system privilege because it is a privilege that allows you to issue selects against all tables. eg: select ,insert ,update etc Difference between With grant and With Admin option :- With grant :- a) can be used only for object privileges. b) User1 => User2 => User3 Here user1 granted access to user2 with "WITH GRANT " So it means User2 got authorization to grant same privilege to anybody.

Eg : User2 granted same privilege to User3 Important point here is ,whoever granted privilege to another user they can only revoke access from them.

It means user1 can revoke access only from User2 but not from User3. SO user3 access can be revoked only by User2 because he granted . Final point is here,When User1 revokes permission from User2 ,it will automatically revokes access from User3 also only thing is direct revoke access is not possible. eg:-grant select on Emp to Venky with grant option; With Admin :- a) can be used only for System privilege. b) User1 => User2 => User3 Its opposite to "With grant ".Here user1 can revoke access from user2 as well as User3. Here suppose if we revoke the privileges from User2 means it wouldn't revoke the privileges of User3. eg:-grant create index to Venky with admin option;

No comments:

Post a Comment