11-Managing Privileges

Particular set of grantable privileges managing

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: rantable privileges. Managing Privileges Tathagata Bhattacharjee Privileges for various objects Object Privilege Table View S equence Procedure ALTER DELETE EXECUTE INDEX INSERT REFERENCES SELECT UPDATE Managing Privileges Tathagata Bhattacharjee Granting Object Privileges GRANT { object_privilege [(column_list)] [, object_priovilege [(column_list)]]… [ALL [PRIVILEGES]} ON [schema.]object TO {user | role | PUBLIC} [, {user | role | PUBLIC} … {WITH GRANT OPTION] Managing Privileges Tathagata Bhattacharjee Where, Object_privilege specifies the object privileges to be granted Column_list specifies a table or view column ALL grants all privileges for the object ON object identified the object on which the privileges are to be granted WITH GRANT OPTION enables the grantee to grant the object privileges to users or roles Managing Privileges Tathagata Bhattacharjee Example SQL> GRANT EXECUTE ON dbms.output TO scott; SQL> GRANT UPDATE ON hr.employee TO scott WITH GRANT OPTION; Managing Privileges Tathagata Bhattacharjee Revoking Object Privileges Revoke statement is used to revoke object privileges. To revoke an object privilege, the revoker must be the original grantor of the object being revoked REVOKE {object_privilege [, object_privilege …| ALL [PRIVILEGES]} ON [schema.]object FROM {user | role | PUBLIC } [, {user | role | PUBLIC }]… [CASCADE CONSTRAINTS] Managing Privileges Tathagata Bhattacharjee Where, Object_privilege specifies the object privilege to be revoked ALL revokes all object privileges that are granted to the user ON identifies the object on which the object privileges are revoked FROM identifies users or roles from which the object privileges are revoked CASCADE_CONSTRAINTS drops any referential integrity that the revoke has defined using the REFERENCES or ALL privileges Managing Privileges Tathagata Bhattacharjee Example SQL> REVOKE SELECT ON hr.employee FROM scott; Managing Privileges Tathagata Bhattacharjee Revoke Cascading Cascading effects can be observed when revoking a system privilege related to a DML operation E.g., if SELECT ANY TABLE is...
View Full Document

This note was uploaded on 07/15/2011 for the course ECO 2023 taught by Professor Mr.raza during the Summer '10 term at FAU.

Ask a homework question - tutors are online