Monday, June 2, 2008

Temp files and tablespaces

FOR DBA

Where are my TEMPFILES, I don't see them in V$DATAFILE or DBA_DATA_FILE?

Tempfiles, unlike normal datafiles are not listed in v$datafile or dba_data_files. Instead query v$tempfile or dba_temp_files:

SELECT * FROM v$tempfile;

SELECT * FROM dba_temp_files;

How do I find used/free space in a TEMPORARY tablespace?

Unlike normal tablespaces, true temporary tablespace information is not listed in DBA_FREE_SPACE. Instead use the V$TEMP_SPACE_HEADER view:

SELECT tablespace_name, SUM (bytes used), SUM (bytes free)

FROM V$temp_space_header

GROUP BY tablespace_name;

No comments: