Temporary Tablespace Groups

Sqlplus / as sysdba

SQL> show pdbs

    CON_ID CON_NAME                     OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                     READ ONLY  NO
         3 PDBPROD1                     READ WRITE NO


SQL> alter session set container=pdbprod1
/

Session altered.

SQL> select name from v$datafile;


NAME
-----------------------------------------------------------------------
/u02/oradata/cdbprod/undotbs01.dbf
/u02/oradata/cdbprod/pdbprod1/system01.dbf
/u02/oradata/cdbprod/pdbprod1/sysaux01.dbf
/u02/oradata/cdbprod/pdbprod1/SAMPLE_SCHEMA_users01.dbf
/u02/oradata/cdbprod/pdbprod1/example01.dbf

SQL> create temporary tablespace temp01 
tempfile '/u02/oradata/cdbprod/pdbprod1/temp01.dbf' 
size 10m autoextend on tablespace group grptemp;

Tablespace created.

1* create temporary tablespace temp02 
tempfile '/u02/oradata/cdbprod/pdbprod1/temp02.dbf' 
size 10m autoextend on tablespace group grptemp

SQL> /

Tablespace created.


  • If needed to change the GROUP after the creation:
SQL> alter tablespace temp01 tablespace group grptemp;

Tablespace altered.

SQL> alter tablespace temp02 tablespace group grptemp;

Tablespace altered.

  • Setting the GROUP as default:
SQL> alter database default temporary tablespace grptemp;

Database altered.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s