Database Security
Database Security
Database Security
• Multi-user database systems like Oracle
include security to control how the
database is accessed and used for
example security Mechanisms:
– Prevent unauthorized database access
– Prevent unauthorized access to schema
objects
– Control disk usage
– Audit user actions
Database security
• Example:
CREATE USER Scott
IDENTIFIED BY tiger
DEFAULT TABLESPACE system
TEMPORARY TABLESPACE temp
QUOTA UNLIMITED on system
PROFILE managerProfile;
User created.
Privileges
• Privileges are the right to execute particular
SQL statements. The database administrator
(DBA) is a high-level user with the ability to grant
users access to the database and its objects
• Example:
▪ The ability to connect to the database
▪ The ability to create a user
▪ The ability to create a table
• System privileges: Gaining access to the
database
• Object privileges: Manipulating the content of the
database objects
schema
• A schema is a collection of objects, such
as tables, views, and sequences.
• The schema is owned by a database user
who create it and has the same name as
that user.
System Privileges
• System privileges can be given to a user by another user who has
administrator privileges or by a user who has the right to grant a
system privilege
• More than 200 privileges are available such as:
– Creating new users
– Removing users
– Removing tables
– Backing up tables
• Special Administrative privileges: required for an administrator to
perform basic database operations are granted through two special
system privileges
• SYSDBA privilege: can do anything
• SYSOPER privilege: sub-admin access, can perform:
– Backup, recover, startup, shutdown
– No access to data itself
System Privilege Operations Authorized
• Syntax:
REVOKE privilege ,ALL
ON object
FROM user,role,PUBLIC;
Example:
REVOKE select, insert
ON departments
FROM Scott;
Revoke succeeded.
How to Revoke Object Privileges