Temp file

From Oracle FAQ
(Redirected from Tempfile)
Jump to: navigation, search

A tempfile is a file that is part of an Oracle database. Tempfiles are used with TEMPORARY TABLESPACES and are used for storing temporary data like sort spill-over or data for global temporary tables.

[edit] Using tempfiles

To see what tempfiles are used:

SELECT * FROM dba_temp_files;

Create a tablespace with TEMPFILE:

CREATE TEMPORARY TABLESPACE temp1 TEMPFILE '/u01/oradata/orcl_temp1_01.dbf' SIZE 100M;

Remove a tempfile from the database:

ALTER DATABASE TEMPFILE '/u01/oradata/orcl_temp1_01.dbf' DROP;

[edit] Also see