Presentation is loading. Please wait.

Presentation is loading. Please wait.

IS221: Database Management

Similar presentations


Presentation on theme: "IS221: Database Management"— Presentation transcript:

1 IS221: Database Management
Lab 5 Information Systems Department TA. Rawan Alayed

2 Outline : Privilege Definition . System Privileges .
Granting System Privileges . Grant ANY Privilege . Revoking System Privileges . Information Systems Department TA. Rawan Alayed

3 Privilege Definition A privilege is a right to execute a particular type of SQL statement or to access another user's object. There are two types of privileges : System Privileges : allow user to CREATE, ALTER or DROP database objects. Object Privileges : allow user to INSERT, UPDATE or DELETE data from database objects to which the privileges apply. Information Systems Department TA. Rawan Alayed

4 System Privileges System Privilege Description ALTER DATABASE
Alter the database. CREATE/DROP/ALTER USER Create/Drop/Alter any user. CREATE/ALTER/DROP/ TABLESPACE Create/Alter/Drop tablespaces in any schema. MANAGE TABLESPACE Take tablespaces OFFLINE and ONLINE and Begin and End tablespace BACKUP. CREATE/ALTER/DROP ANY TABLE Create/Alter/Drop tables in any schema. CREATE/DROP ANY VIEW Create/Drop views in any schema. INSERT/UPDATE/SELECT/ DELETE ANY TABLE Insert/Update/Query/Delete rows from tables in any schema. EXECUTE ANY PROCEDURE Execute procedures or functions, either standalone or packaged. GRANT ANY PRIVILEGE Grant any system privilege (not object privileges). Information Systems Department TA. Rawan Alayed

5 System Privileges Grant system privileges to particular user :
“ Grant privilege_name to user_name ; “ For example : ALTER DATABASE privilege : “ Grant ALTER DATABASE to user_name; “ Information Systems Department TA. Rawan Alayed

6 System Privileges CREATE TABLE privilege :
“ Grant Create Table to user_name “ DROP TABLE privilege : “ Grant Drop Any Table to user_name “ Information Systems Department TA. Rawan Alayed

7 “ Grant Create View to user_name “
CREATE VIEW privilege : “ Grant Create View to user_name “ Information Systems Department TA. Rawan Alayed

8 Granting System Privileges
Grant system privileges to all users at once : “ Grant system_privilege to PUBLIC ; “ For example : Create Table privilege : “ Grant create_table to PUBLIC ; “ Information Systems Department TA. Rawan Alayed

9 ANY Privilege System privileges that use the ANY keyword enable you to set privileges for an entire category of objects in the database. For example, the CREATE ANY TABLE system privilege permits a user to create a table anywhere in the database. Information Systems Department TA. Rawan Alayed

10 Revoking System Privilege
Using REVOKE command, cancel the privileges to particular user . “ Revoke privilege_name from user_name “ For example : ALTER DATABASE privilege : “ Revoke DROP ANY TABLE from Rawan; “ Information Systems Department TA. Rawan Alayed

11 Visit the link for more System Privileges :
/statements_9013.htm Information Systems Department TA. Rawan Alayed

12 Information Systems Department TA. Rawan Alayed


Download ppt "IS221: Database Management"

Similar presentations


Ads by Google