Oracle資料庫聯機日誌檔案丟失處理方法(3)

jss001發表於2009-02-12
實驗三:透過重新生成控制檔案來恢復redo

 前面的都一樣,只是處理方法不一樣SQL>; startup ORACLE instance started.

Total System Global Area 353862792 bytes

Fixed Size 730248 bytes

Variable Size 285212672 bytes

Database Buffers 67108864 bytes

Redo Buffers 811008 bytes Database mounted.

ORA- 00313: open failed for members of log group 1 of thread 1 ORA-00312: online log 1 thread 1: '/T3/ORACLE/oradata/ORA9/redo01.log'

SQL>; alter database backup controlfile to trace;

Database altered.

SQL>; shutdown immediate ORA-01109: database not open

Database dismounted.

ORACLE instance shut down.

SQL>

2、 修改一下剛才生成的那個檔案

CREATE CONTROLFILE REUSE DATABASE "ORA9" RESETLOGS ARCHIVELOG―― SET STANDBY TO MAXIMIZE PERFORMANCE MAXLOGFILES 50 MAXLOGMEMBERS 5 MAXDATAFILES 100 MAXINSTANCES 1 MAXLOGHISTORY 226 LOGFILE GROUP 1 '/T3/ORACLE/oradata/ORA9/redo01.log' SIZE 100M,GROUP 2 '/T3/ORACLE/oradata/ORA9/redo02.log' SIZE 100M,GROUP 3 '/T3/ORACLE/oradata/ORA9/redo03.log' SIZE 100M―― STANDBY LOGFILE DATAFILE '/T3/ORACLE/oradata/ORA9/system01.dbf','/T3/ORACLE/oradata/ORA9 /undotbs01.dbf','/T3/ORACLE/oradata/ORA9/cwmlite01.dbf','/T3/ORACLE /oradata/ORA9/drsys01.dbf','/T3/ORACLE/oradata/ORA9/example01.dbf','/T3 /ORACLE/oradata/ORA9/indx01.dbf','/T3/ORACLE/oradata/ORA9/odm01.dbf',' /T3/ORACLE/oradata/ORA9/tools01.dbf','/T3/ORACLE/oradata/ORA9 /users01.dbf','/T3/ORACLE/oradata/ORA9/xdb01.dbf','/T3/ORACLE/oradata /ORA9/test01.dbf' CHARACTER SET ZHS16GBK;

另存為一個指令碼,執行他

SQL> @clone.sql Control file created.

SQL>; alter database open resetlogs;

Database altered.

SQL>;搞定……………

結論:這種方法的關鍵是重新建立控制檔案,後面的步驟和前面的道理一樣的

前面的三種方法都是假設db是正常關閉的,資料已經寫入資料庫檔案中,所以不會由資料存在redo種,所以clear的話也不會有資料丟失[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/18921899/viewspace-1017275/,如需轉載,請註明出處,否則將追究法律責任。

相關文章