In this Document
| Common Issues Involving Temporary Tablespaces |
| ORA-1630 / ORA-1652 issues related to Temporary Tablespace |
| Dropping the Temporary Tablespace issues |
| ORA-25153 Temporary Tablespace Is Empty issues |
| Other ORA- Errors involving the Temporary Tablespace |
| Issues involving high Temporary Tablespace usage |
| Helpful Articles on Temporary Tablespaces |
| How to Resize / Drop the Temporary Tablespace |
| Enhancements / Restrictions on Temporary Tablespaces |
| Behaviour / Monitoring Temporary Tablespace Usage |
| Scripts / Other How to Articles |
APPLIES TO:Oracle Database - Enterprise Edition - Version 9.2.0.1 and later
Information in this document applies to any platform.
PURPOSEThis document is intended to assist Database Administrators resolve issues encountered involving the Temporary Tablespaces.
TROUBLESHOOTING STEPS
ConceptsA temporary tablespace contains transient data that persists only for the duration of the session. Temporary tablespaces can improve the concurrency of multiple sort operations that do not fit in memory and can improve the efficiency of space management operations during sorts. Within a temporary tablespace, all sort operations for a particular instance share a single sort segment, and sort segments exist for every instance that performs sort operations that require temporary space. A sort segment is created by the first statement after startup that uses the temporary tablespace for sorting, and is released only at shutdown. A single temporary tablespace can be shared by multiple users. You cannot explicitly create objects in a temporary tablespace (with the exception of temporary tables)
Common Issues Involving Temporary TablespacesIssues with temporary tablespaces involve monitoring temporary tablespaces, running out of temporary tablespace, having a large temporary tablespace and resizing (mainly decreasing) a temporary tablespace. The physical files that comprise a temporary tablespace are called tempfiles, as opposed to datafiles and information on these files are available in dba_temp_files or v$tempfile:
SQL> select * from dba_temp_files order by tablespace_name;
SQL> select * from v$tempfile; Also, you need to use the TEMPFILE clause, not the DATAFILE clause when working with temporary tablespaces, otherwise you will receive the following error:
ALTER TABLESPACE temp ADD datafile '/u01/app/oracle/tempfile/tempo3.dbf' size 1000M reuse;
ALTER TABLESPACE temp ADD datafile '/u01/app/oracle/tempfile/tempo3.dbf' size 1000M reuse
*
ERROR at line 1: ORA-03217: invalid option for alter of TEMPORARY TABLESPACE The following are valid SQL statements against temporary tablespaces:
SQL> ALTER TABLESPACE temp ADD TEMPFILE '/u01/app/oracle/tempfile/tempo3.dbf' size 1000M reuse;
SQL> ALTER DATABASE TEMPFILE '/u01/app/oracle/tempfile/temp03.dbf' DROP INCLUDING DATAFILES; For additional information, refer to Note 160426.1 TEMPORARY Tablespaces : Tempfiles or Datafiles ?
The following content will list some known issues and documents to help investigate and troubleshoot issues with temporary tablespaces.
ORA-1630 / ORA-1652 issues related to Temporary TablespaceThese documents can be used to diagnose and resolve space management errors:
Note 260944.1 Overview Of ORA-01630 Max # Extents(%) reached in temp segment in tablespace % Note 470032.1 ORA-1652 When Users Temporary Tablespace is Assigned to System Tablespace Note 303930.1 ORA-1652 On A Temporary Tablespace With Autoextensible Files Note 1054952.6 ORA-01652: Trying to Set Quotas for Users on Temp Tablespace Note 1267351.1 TROUBLESHOOTING GUIDE (TSG) : ORA-1652: unable to extend temp segment Note 1428493.1 LARGE / HUGE TEMPORARY TABLESPACE (possibly with ORA-1652) Note 1025288.6 TROUBLESHOOTING GUIDE (TSG) - UNABLE TO CREATE / EXTEND Errors
Dropping the Temporary Tablespace issuesThe following outline issues with dropping the temporary tablespace:
Note 1500044.1 Unable To Drop Temporary Tablespace Note 1056652.6 DROP TABLESPACE Command Slow or Hanging on a Tablespace Note 1413933.1 Dropped Temp File Is Still Visible In Database And Remains On File System Note 214371.1 Drop Temp Tablespace Command Hangs
ORA-25153 Temporary Tablespace Is Empty issuesThe following are known issues when ORA-25153 are reported:
Note 422723.1 ORA-25153 Temporary Tablespace Is Empty Note 843899.1 DB Upgrade Throws ORA-25153: “Temporary Tablespace Is Empty” Note 1384299.1 ORA-25153 Reported when Adding a Temp File to the Temporary Tablespace
Other ORA- Errors involving the Temporary TablespaceNote 1109514.1 Ora-600 [Ktftshk-1] Error Shrinking the Temp Tablespace Bug 8223165 ORA-600 [ktsxtffs2] During Startup When Using Temporary Tablespace Group Note 1259393.1 ORA-07445 [Kttuser0()+439] [Int_divide_by_zero] After Creating a New Temporary Tablespace Note 1264367.1 How To Correct ORA-01186 Error Affecting Temp Tablespace Note 444929.1 Ora-27069 Using Autoextend Bigfile Temporary Tablespace
Issues involving high Temporary Tablespace usageNote 1499422.1 DataPump Network Mode Import Consumes Lots Of Temporary Segments In TEMP Tablespace Note 748251.1 EM Agent DBSNMP Using Up Excessive Temp Space In Database
HELPFUL ARTICLES ON TEMPORARY TABLESPACESThe following documents offer guidelines to follow when dropping or resizing temporary tablespaces:
How to Resize / Drop the Temporary TablespaceNote 452697.1 How To Shrink A Temporary Tablespace in 11G ? Note 409183.1 Resizing (or Recreating) the Temporary Tablespace Note 273276.1 How to Shrink the Datafile of Temporary Tablespace Note 285993.1 How to Drop the Temporary Tablespace when it has Entries in V$SORT_USAGE
Enhancements / Restrictions on Temporary TablespacesNote 138212.1 9i: Database DEFAULT TEMPORARY TABLESPACE and Restrictions Note 245645.1 10g: Temporary Tablespaces Group Note 473192.1 RENAME TEMPFILE WITH ORACLE10G Note 1099324.1 DB 11.1: Temporary Tablespaces [Video] Note 1064846.1 Temporary Tablespace Enhancements in Oracle Database 11g Release 1
Behaviour / Monitoring Temporary Tablespace UsageThe following describe the behaviour of temporary tablespaces and how to monitor the usage of temporary space on your database:
Note 1039341.6 Temporary Segments Are Not Being De-Allocated After a Sort Note 61997.1 SMON - Temporary Segment Cleanup and Free Space Coalescing Note 317441.1 How Do You Find Who And What SQL Is Using Temp Segments Note 1069041.6 How to Find Creator of a SORT or TEMPORARY SEGMENT or Users Performing Sorts Note 289894.1 Queries To Monitor Temporary Tablespace Usage Note 188846.1 Optimizing performance with temporary tablespaces.
Scripts / Other How to ArticlesNote 111405.1 Script: Change the Default and Temporary Tablespace for Database Users Note 1360446.1 How to Calculate the Size of the Database Note 167135.1 How to Incorporate Locally Managed Temporary Tablespaces into the Backup Strategy
12c Multitenant Behavior:There is one default temporary tablespace at the entire CDB level and you can create multiple temporary tablespaces at the CDB level and like traditional database, only one can be default temp tablespace at the CDB level. Users can be explicitly assigned some temp tablespaces at PDB level. At the PDB level also, we can have the same structure like traditional one with multiple temp tablespaces and one default temp tablespaces. Users can be explicitly assigned some temp tablespaces at PDB level. If a user has temp tablespace assigned explicitly at the CDB and PDB level, then the temp tablespace assigned to it depends on the container(PDB or CDB) in which it is present currently. If a user is present in PDB but is not assigned any temp tablespace explicitly and the PDB also doesn't have any default temp tablespace, then the default temp tablespace at the CDB level is assigned to that user(where as in traditional one we have system tablespace assigned).
FURTHER DIAGNOSTICSIf you were not able to resolve the issue with the details provided in this document, please raise a Service Request for further assistance from Oracle Support.
REFERENCESNOTE:1493350.1 - Master Note: Overview of Oracle Tablespace Management NOTE:1522807.1 - Master Note: Troubleshooting Oracle Tablespace Management NOTE:1498442.1 - Master Note: Overview of Oracle Temporary Tablespaces
|
![](https://oscdn.geek-share.com/Uploads/Images/Content/201708/200491d1ae6203cbdf7e02dca39a75b1.gif)
Oracle
Database Products > Oracle
Database Suite > Oracle
Database > Oracle
Database - Enterprise Edition >
RDBMS > Temporary
Tablespaces
TEMPFILES;
![](https://oscdn.geek-share.com/Uploads/Images/Content/201708/200491d1ae6203cbdf7e02dca39a75b1.gif)
TEMPORARY
TABLESPACE;
TROUBLESHOOT