List only Oracle Temp Table Space

Malatesh picture Malatesh · Aug 3, 2015 · Viewed 10.1k times · Source

Is there way to list only temp tablespaces in Oracle? I found following query which is listing all the tablespaces, I just need only temp tablespaces.

SQL> select tablespace_name from dba_tablespaces;

TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
TEMP
USERS

Answer

Mureinik picture Mureinik · Aug 3, 2015

You can filter the list by the contents column:

SELECT tablespace_name FROM dba_tablespaces WHERE contents = 'TEMPORARY'

As described in the Oracle Database Online Documentation for dba_tablespaces.