ORA-01652: Unable to extend temp segment by N in tablespace
OracleWhat does it mean?
Oracle could not find enough free space in the tablespace to extend a temporary (temp) segment. Usually occurs during sorts, hash joins or global temporary table operations.
Why does it happen?
The TEMP tablespace is full; large ORDER BY, GROUP BY, DISTINCT, hash join or index creation operations do not fit in PGA memory and spill to disk; datafiles have AUTOEXTEND off, or disk space runs out.
How to fix it
Monitor TEMP usage: SELECT * FROM v$sort_usage / v$tempseg_usage. Add a file to or enlarge the TEMP tablespace: ALTER TABLESPACE temp ADD TEMPFILE '...' SIZE 2G AUTOEXTEND ON. If a permanent tablespace is full, add a datafile. Reduce disk sorts by optimizing the query (appropriate index, larger PGA_AGGREGATE_TARGET).
More from this engine
- ORA-00060Deadlock detected while waiting for resource
- ORA-01017Invalid username/password; logon denied
- ORA-01555Snapshot too old: rollback segment number too small
- ORA-04031Unable to allocate N bytes of shared memory
- ORA-12154TNS: could not resolve the connect identifier specified
- ORA-12514TNS: listener does not currently know of service requested in connect descriptor
- ORA-00942Table or view does not exist