fbpx

What Are Oracle Connect & Resource Privileges

lightning strikes

Since the beginning of Oracle databases, there are 2 important roles.

Depending on the Oracle version, these roles may have changed.

If you want to know the permissions each role has, then you can execute these queries:

To check the permissions the CONNECT role has: 

column role format a20 

select * 
from role_sys_privs 
where role='CONNECT';

ROLE                 PRIVILEGE                                ADM COM INH
-------------------- ---------------------------------------- --- --- ---
CONNECT              SET CONTAINER                            NO  YES NO
CONNECT              CREATE SESSION                           NO  YES NO

And now the RESOURCE role: 

column role format a20 

select * 
from role_sys_privs 
where role='RESOURCE';

ROLE                 PRIVILEGE                                ADM COM INH
-------------------- ---------------------------------------- --- --- ---
RESOURCE             CREATE SEQUENCE                          NO  YES NO
RESOURCE             CREATE PROCEDURE                         NO  YES NO
RESOURCE             CREATE CLUSTER                           NO  YES NO
RESOURCE             CREATE INDEXTYPE                         NO  YES NO
RESOURCE             CREATE OPERATOR                          NO  YES NO
RESOURCE             CREATE TYPE                              NO  YES NO
RESOURCE             CREATE TRIGGER                           NO  YES NO
RESOURCE             CREATE TABLE                             NO  YES NO

How to Create a Tablespace in Oracle

adventure alpine background black and white

From time to time you’ll need to create a new tablespace in your Oracle database.

Here is how to create a tablespace in Oracle.

Permanent tablespace

CREATE tablespace TS_NAME datafile
size 1G AUTOEXTEND ON NEXT 500M MAXSIZE UNLIMITED;

Temporary tablespace

CREATE temporary tablespace TS_TEMP tempfile
size 1G AUTOEXTEND ON NEXT 500M MAXSIZE UNLIMITED;

Undo tablespace

CREATE undo tablespace TS_UNDO datafile size 3G;

How to increase a tablespace size in Oracle

ALTER TABLESPACE TS_NAME ADD DATAFILE 
SIZE 100M AUTOEXTEND ON NEXT 500M MAXSIZE UNLIMITED;