Saturday, October 30, 2010

Missing Tempfiles

Missing Tempfiles

Tempfiles are usually not backed up.

Since Oracle does not record checkpoint information in tempfiles, Oracle can start up a database with a missing tempfile.

Likewise, it is possible to remove (or in this case, not recreate) all tempfiles from a temporary tablespace and keep it empty.

But when a user attempts to sort to the TEMPORARY tablespace, an error is generated.

The solution is to add a new tempfile
--------


Solution
To implement the solution, please execute the following steps:

1. Drop the tempfile from the database:

SQL> alter database tempfile '/u01/oracle/admin/demo/link/DEMO_TEMP01.dbf' drop;

Database altered.

2. Add tempfile to tablespace:

SQL> alter tablespace temp add tempfile '/u01/oracle/admin/demo/link/DEMO_TEMP01.dbf' size M;

Hope this helps. Regards Rupam