database security grant and revke queries of my sql
Size: 59.33 KB
Language: en
Added: Jan 27, 2016
Slides: 10 pages
Slide Content
Database Management system
Security management using SQL GRANTING AND REVOKING PERMISSIONS
Oracle provides extensive security features in order to safeguard information stored in its table from unauthorized viewing and damage . The rights that allow the use some or all of oracle’s resources on the server are called privilege. Objects created by a user are owned and controlled by that user only. If any other user wants to access any of the object built by any other user he must ask a permission from the owner of the object . This is called granting of permission. Privileges may also be taken back by the owner of the object it is called revoking.
Granting privilege using the GRANT statement The grant statement provides various types of access to database objects such as tables, views, and sequences and so on syntax: GRANT <Object privileges> ON <Object Name> [WITH GRANT OPTION];
A user can grant all the privileges or grant only specific object privileges. ALTER DELETE INDEX INSERT SELECT UPDATE
WITH GRANT OPTION The WITH THE GRANT OPTION allows the grantee to in turn grant object privileges to other users . Example 1: GRANT ALL ON _ACCT_MSTR TO Ivan WITH GRANT OPTION Example 2: GRANT ALL ON EMP_MSTR TO sharanaman
Referencing a table belonging to another user Once a user has privilege to access another user’s object ,the user can access the table by prefixing the table with the name of the owner Example: View the content of the FD_MSTR table that belong to sharanam SELECT* FROM sharanam.FD_MSTR ;
Granting privilege when a grantee has been given the grant privilege example: GRANT SELECT ON vaishali.TRANS_MSTR TO chhaya
Revoking privileges given P rivileges once given can be denied using REVOKE command. A user who is not the owner but has been granted the GRANT privilege, HAS THE POWER TO REVOKE THE PRIVILEGE FROM A GRANTEE syntax: REVOKE<Object privileges> ON <object Name> FROM <user name>;
The revoke command is used to revoke object privilege that the user previously granted directly to the grantee. The REVOKE command cannot be used to revoke the privilege granted through the operating system. Examples: REVOKE DELETE ON NOMINEE_MSTR FROM anil example: REVOKE SELECT ON alex.FDSLAB_MSTR FROM rocky