How to Shrink the Datafile of Temporary Tablespace
(Doc ID 273276.1)
Last updated on NOVEMBER 19, 2019
Applies to:Oracle Database - Enterprise Edition - Version 188.8.131.52 to 184.108.40.206 [Release 8.1.7 to 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.
***Checked for relevance on 26-Oct-2016***
The database has a program which performs a huge sort operation (e.g. end of the year reporting process). This may cause the TEMP tablespace to grow and occupy most of the space on the file system.
In this example, the report process may run once or twice a year and there is no need to maintain/keep a huge tempfile.
The TEMP tablespace was created with datafiles (dictionary managed tablespace temporary) as AUTOEXTEND ON MAXSIZE UNLIMITED to avoid the Error:
ORA-1652 Text: unable to extend temp segment by %s in tablespace %s.
Attempts have been made to "alter database datafile .. resize" which fail with:
Error: ORA 3297 : file contains <> blocks of data beyond requested RESIZE value
You want to shrink the datafile to utilize the disk space for other tablespaces or other purposes.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document