分类: Oracle
2008-04-18 13:33:51
處理過程:
附註.. 被刪掉的 file 再也回不來了.. 只能先把 DB 開啟來.. 不見的部分再自己補建回去
$ sqlplus /nolog
SQL>conn/as sysdba
SQL>startup;
出現錯誤信息:ORA-01081: cannot start already-running ORACLE - shut it down first
再用SQL語句查看DB的狀態:select status, instance_name from v$instance ;
出現ORA-01109:database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount數據庫啓動時只啓動實例,不安裝數據庫,不打開數據庫
結果:ORACLE instance started.
Total System Global Area 591396864 bytes
Fixed Size 2074504 bytes
Variable Size 390072440 bytes
Database Buffers 192937984 bytes
Redo Buffers 6311936 bytes
3. SQL> alter database mount;數據庫由不安裝數據庫改爲安裝數據庫;
SQL> alter database open ; 數據庫由不打開數據庫改爲打開數據庫;
結果:ERROR at line 1:
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
ORA-01110: data file 7: '/THAWS_D01/cyms01.dbf'
SQL> alter database datafile '/THAWS_D01/cyms01.dbf' offline drop ; 刪除Datafile(cyms01.dbf):
SQL> alter database datafile '/THAWS_D01/cyms01.dbf' offline drop ;
結果:Database altered.
SQL〉alter database open ;
結果:ERROR at line 1:
ORA-01157: cannot identify/lock data file 8 - see DBWR trace file
ORA-01110: data file 8: '/THAWS_D01/cyms_idx01.dbf'
SQL> alter database datafile '/THAWS_D01/cyms_idx01.dbf' offline drop ; 刪除Datafile(cyms_idx01.dbf):
SQL> alter database datafile '/THAWS_D01/cyms_idx01.dbf' offline drop ;
結果:Database altered.
SQL>alter database open ;
結果:Database altered.
SQL〉shutdown immediate ;
結果:Database closed.
Database dismounted.
ORACLE instance shut down.
SQL〉startup;
SQL> startup;
結果:ORACLE instance started.
Total System Global Area 591396864 bytes
Fixed Size 2074504 bytes
Variable Size 377489528 bytes
Database Buffers 205520896 bytes
Redo Buffers 6311936 bytes
Database mounted.
Database opened.