oracle丟失temp表空間處理

以前有作臨時表空間的切換,切換後沒drop tablespace就刪除了temp01.dbf結果排序跟查dba_temp_files報錯數據庫

SQL> select tablespace_name,file_id,file_name,bytes/1024/1024 Mbytes from dba_temp_files;
select tablespace_name,file_id,file_name,bytes/1024/1024 Mbytes from dba_temp_files
                                                                     *
ERROR at line 1:
ORA-01116: error in opening database file 201
ORA-01110: data file 201: '/home/oracle/oradata/osa/temp01.dbf'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

兩種方法能夠恢復oracle

一、重啓數據庫spa

重啓後系統會自動重建,數據庫會提示re-creating在bdump的alter_sid.log中code

Re-creating tempfile /home/oracle/oradata/osa/temp01.db

二、重建orm

alter tablespace temp add tempfile '/oracle/oradata/osa/temp03.dbf' size 50m;
alter tablespace temp drop  tempfile '/oracle/oradata/osa/temp01.dbf' ;
相關文章
相關標籤/搜索