System Privileges
A system privilege allows a user to perform certain actions within the database, such as executing DDL statements.
The privileges can be grouped together into roles.
Two useful roles to grant to a user are CONNECT
and RESOURCE
.
CONNECT
allows a user to connect to the database.
RESOURCE
allows a user to create various database objects like tables.
Commonly Used System Privileges:
System Privilege | Allows You to |
---|---|
CREATE SESSION | Connect to a database. |
CREATE SEQUENCE | Create a sequence |
CREATE SYNONYM | Create a synonym. |
CREATE TABLE | Create a table in the user's schema. |
CREATE ANY TABLE | Create a table in any schema. |
DROP TABLE | Drop a table from the user's schema. |
DROP ANY TABLE | Drop a table from any schema. |
CREATE PROCEDURE | Create a stored procedure. |
EXECUTE ANY PROCEDURE | Execute a procedure in any schema. |
CREATE USER | Create a user. |
DROP USER | Drop a user. |
CREATE VIEW | Create a view. |
Granting System Privileges to a User
You use GRANT
to grant a system privilege to a user.
GRANT CREATE SESSION, CREATE USER, CREATE TABLE TO tom;
Home »
Oracle »
User, Privilege, Role »
Oracle »
User, Privilege, Role »
System Privileges:
- System Privileges
- Use WITH ADMIN OPTION
- Checking System Privileges Granted to a User
- Revoking System Privileges from a User
Related: