Oracle SQL in 10 Minutes - Asim Abbasi
CH1: SQL Basics | CH2: SQL Operators | CH3: SQL Built-in Functions | CH4: SQL Joins | CH5: UPDATE, INSERT & DELETE Statements | CH6: CREATE, ALTER & DROP Statements | CH7: Constraints | CH8: Linking Tables vs Joining Tables | CH9: SQL Statements for Other Database Objects | CH10: SQL Statements for Database Security
Chapter 10: SQL Statements for Database Security
Two very special and important system privileges are SYSDBA and SYSOPER.
That’s why I want to discuss them separately. Following table describes
the power lies beneath these two system privileges.
SYSDBA
Create new database
Startup, Shut down database
Alter database with the OPEN, MOUNT, BACKUP, CHANGE CHARACTER SET,
ARCHIVELOG and RECOVER options
Create SP file
SYSOPER
Startup, Shut down database
Alter database with the OPEN, MOUNT, BACKUP, ARCHIVELOG and RECOVER
options
Create SP file
Example:
CREATE ROLE hr_emps;
GRANT SELECT, UPDATE
ON emp_test
TO hr_emps;
GRANT hr_emps
TO margorie, daisy, jessie, semper;
In this example we have first created the role hr_emps and next we
assign certain privileges to it and finally we have assigned it to all
the employees of hr (Human Resources department). After a month, new
business rule comes up which says that all the hr employees should only
be having SELECT privilege on emp_test table. To implement this rule all
you have to do is to revoke the privilege from the role e.g.
REVOKE UPDATE
ON emp_test
FROM hr_emps;
Chapter 10: SQL Statements for Database Security
CH1: SQL Basics | CH2: SQL Operators | CH3: SQL Built-in Functions | CH4: SQL Joins | CH5: UPDATE, INSERT & DELETE Statements | CH6: CREATE, ALTER & DROP Statements | CH7: Constraints | CH8: Linking Tables vs Joining Tables | CH9: SQL Statements for Other Database Objects | CH10: SQL Statements for Database Security
Share with others: