N
The Daily Insight

How do I find out the size of my temp tablespace?

Author

Rachel Ross

Updated on May 18, 2026

How do I find out the size of my temp tablespace?

select TABLESPACE_NAME “TEMP TBS NAME”,bytes/(1024*1024) “SIZE(MBs)”,BYTES_USED/(1024*1024) “BYTES USED(MBs)”,BYTES_FREE/(1024*1024) “BYTES FREE(MBs)” from sys. V_$TEMP_SPACE_HEADER,v$tempfile; From 11g, we can check free temporary space in new view DBA_TEMP_FREE_SPACE.

How can I check free space in TEMP tablespace?

Find the temp usage by sessions in Oracle

  1. Check the temp usage by sessions. SELECT b.tablespace, ROUND(((b.blocks*p.value)/1024/1024),2)||’M’ AS temp_size,
  2. Find the temp tablespace usage. select a.tablespace_name tablespace, d.TEMP_TOTAL_MB,
  3. Check detail of size and free space in TEMP. SELECT * FROM dba_temp_free_space;

What is temp tablespace used for in Oracle?

Temporary tablespaces are used for storing temporary data, as would be created when SQL statements perform sort operations. An Oracle database gets a temporary tablespace when the database is created. You would create another temporary tablespace if you were creating a temporary tablespace group.

Why is temp tablespace full?

Answer: The TEMP tablespace is used for large hash joins and sorts, operations that will not fit into the PGA. It is completely normal for the TEMP tablespace to show at 100% full, and this does not mean that it is out of space.

How do I free up temp space in Oracle?

2 Answers

  1. Create Temporary Tablespace Temp CREATE TEMPORARY TABLESPACE TEMP2 TEMPFILE ‘/u01/app/oradata/temp01.dbf′ SIZE 2000M ;
  2. Move Default Database temp tablespace ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp2;
  3. Make sure No sessions are using your Old Temp tablespace a.

How do I know if tablespace is Autoextend?

We can query the DBA_DATA_FILES view to check whether the data file is in AUTOEXTEND mode. SQL> select tablespace_name, file_name, autoextensible from dba_data_files; To confirm whether the maxsize is set to UNLIMITED we have to check for the maximum possible size, as there is no concept of an ‘UNLIMITED’ file size.

What is temp space?

A temporary tablespace is a special set of files associated with an Oracle database that contain data that is not required for read-consistency or for recovery. There are a few different ways that Oracle utilizes temporary tablespace.

How do I check my temp space?

Temporary tablespace usage monitoring is a simple task of querying V$TEMPSEG_USAGE (V$SORT_USAGE, if that is preferred) over time: select segtype, extents, blocks from v$tempseg_usage where tablespace = ‘TEMP’;

How do I resize a temp file?

Tempfile resize

  1. Create another temp Tablespace=0D.
  2. Make this as the default temp Tablespace for the database=0D.
  3. Move all the current users to this Tablespace=0D.
  4. Drop the original TEMP Tablespace and recreate it and then move all.

How does Autoextend work in Oracle?

6.4 Autoextend Tablespace. You can set a tablespace to automatically extend itself by a specified amount when it reaches its size limit. If you do not enable autoextend, then you are alerted when the tablespace reaches its critical or warning threshold size.