How to recover database when Temp file lost i.e remove from disk.
SQL> select * from abc order by 1;
select * from abc order by 1
*
ERROR at line 1:
ORA-01116: error in opening database file 201
ORA-01110: data file 201: '/home/oracle/10.2.0/product/oradata/orcl/temp01.dbf'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Add a new datafile in temporary tablespace and drop old datafile
SQL> select file_name ,status from dba_temp_files;
FILE_NAME
--------------------------------------------------------------------------------
STATUS
---------
/home/oracle/10.2.0/product/oradata/orcl/temp01.dbf
AVAILABLE
SQL> alter tablespace temp add tempfile '/home/oracle/10.2.0/product/oradata/orcl/temp02.dbf' size 200m ;
Tablespace altered.
SQL> alter tablespace temp drop tempfile '/home/oracle/10.2.0/product/oradata/orcl/temp01.dbf' ;
Tablespace altered.
SQL> select * from abc order by 1;
No comments:
Post a Comment