CREATE TABLESPACE

The Oracle RDBMS CREATE TABLESPACE statement is used to allocate space in the Oracle database where schema objects are stored.

The general format is:

CREATE TABLESPACE tablespacename
DATAFILE DatafileOptions StorageOptions;
DatafileOptions:
'filespec' [AUTOEXTEND OFF]
'filespec' [AUTOEXTEND ON [NEXT int K | M] [MAXSIZE int K | M]]
StorageOptions:
DEFAULT [COMPRESS|NOCOMPRESS] STORAGE storage_clause
MINIMUM EXTENT int {K|M}
BLOCKSIZE int K
LOGGING | NOLOGGING
FORCE LOGGING
ONLINE | OFFLINE
PERMANENT | TEMPORARY
EXTENT MANAGEMENT {DICTIONARY |
LOCAL {AUTOALLOCATE | UNIFORM [SIZE int K | M]} }
SEGMENT SPACE MANAGEMENT {MANUAL | AUTO}

Example 1:

CREATE TABLESPACE mytbs
DATAFILE 'mytbs01.dat'
SIZE 100M
REUSE
AUTOEXTEND ON NEXT 10M MAXSIZE 900M;

Example 2:

CREATE TEMPORARY TABLESPACE temptbs
TEMPFILE 'temptbs01.dbf'
SIZE 5M
AUTOEXTEND ON;