fbpx

How to Create a Tablespace in Oracle

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;

Leave a Reply

Your email address will not be published.