【備份恢復】恢復 丟失已歸檔重做日誌檔案
1) 檢視當前日誌組狀態,第2組日誌為當前日誌組,另外兩組為非活動狀態且已歸檔,還有,每組日誌均為 2個成員
SQL> select group#,members,archived,status from v$log;
GROUP# MEMBERS ARC STATUS
---------- ---------- --- ----------------
1 2 YES INACTIVE
2 2 NO CURRENT
3 2 YES UNUSED
SQL> select group#,member from v$logfile order by 1;
GROUP# MEMBER
---------- --------------------------------------------------
1 /u01/app/oracle/oradata/ORA11GR2/redo01.log
1 /u01/app/oracle/oradata/ORA11GR2/redo01_a.log
2 /u01/app/oracle/oradata/ORA11GR2/redo02_a.log
2 /u01/app/oracle/oradata/ORA11GR2/redo02.log
3 /u01/app/oracle/oradata/ORA11GR2/redo03_a.log
3 /u01/app/oracle/oradata/ORA11GR2/redo03.log
6 rows selected.
2) 刪除第3組日誌檔案
[oracle@wang ~]$ cd /u01/app/oracle/oradata/ORA11GR2/
[oracle@wang ORA11GR2]$ ls redo*
redo01_a.log redo02_a.log redo03_a.log
redo01.log redo02.log redo03.log
[oracle@wang ORA11GR2]$
[oracle@wang ORA11GR2]$ rm redo03_a.log
[oracle@wang ORA11GR2]$ rm redo03.log
[oracle@wang ORA11GR2]$
[oracle@wang ORA11GR2]$ ls redo*
redo01_a.log redo01.log redo02_a.log redo02.log
[oracle@wang ORA11GR2]$
3) 重啟資料庫
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup
ORACLE instance started.
Total System Global Area 830930944 bytes
Fixed Size 2257800 bytes
Variable Size 503319672 bytes
Database Buffers 322961408 bytes
Redo Buffers 2392064 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 29933
Session ID: 1 Serial number: 9
4) 此時我們發現 alert 日誌有如下錯誤:
[oracle@wang ORA11GR2]$ cd trace/
[oracle@wang trace]$ pwd
/u01/app/oracle/diag/rdbms/ora11gr2/ORA11GR2/trace
[oracle@wang
trace]$ tail
-100f alert_ORA11GR2.log
============================================================================
ALTER DATABASE OPEN
LGWR: STARTING ARCH PROCESSES
Fri Sep 23 13:29:02 2016
ARC0 started with pid=20, OS id=29945
ARC0: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC0: STARTING ARCH PROCESSES
Errors in file /u01/app/oracle/diag/rdbms/ora11gr2/ORA11GR2/trace/ORA11GR2_lgwr_29821.trc:
ORA-00313: open failed for members of log group 1 of thread 1
Errors in file /u01/app/oracle/diag/rdbms/ora11gr2/ORA11GR2/trace/ORA11GR2_lgwr_29821.trc:
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/ORA11GR2/redo03.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/ora11gr2/ORA11GR2/trace/ORA11GR2_lgwr_29821.trc:
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/ORA11GR2/redo03.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/ora11gr2/ORA11GR2/trace/ORA11GR2_ora_29933.trc:
ORA-00313: open failed for members of log group 1 of thread
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/ORA11GR2/redo03.log'
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/ORA11GR2/redo03_a.log'
Fri Sep 23 13:29:03 2016
ARC1 started with pid=21, OS id=29975
USER (ospid: 29933): terminating the instance due to error 313
System state dump requested by (instance=1, osid=29933), summary=[abnormal instance termination].
System State dumped to trace file /u01/app/oracle/diag/rdbms/ora11gr2/ORA11GR2/trace/ORA11GR2_diag_29801_20160923132903.trc
Dumping
diagnostic data in directory=[cdmp_20160923132903], requested by (instance=1,
osid=29933), summary=[abnormal instance termination].
Instance terminated by USER, pid = 29933
============================================================================================
5) 啟動資料庫到 mount 狀態
SQL> conn / as sysdba
Connected to an idle instance.
SQL>
SQL> startup mount;
(此步驟不需要資料檔案,只需要控制檔案就可以)
ORACLE instance started.
Total System Global Area 830930944 bytes
Fixed Size 2257800 bytes
Variable Size 503319672 bytes
Database Buffers 322961408 bytes
Redo Buffers 2392064 bytes
Database mounted.
6) clear 修復日誌檔案
(clear的動作就是在作業系統redo日誌對應路徑下建立日誌檔案,只是建立的檔案是新的,且是未使用過的)
SQL> alter database clear logfile group 3;
Database altered.
——驗證:
[oracle@wang ORA11GR2]$ ls redo*
redo01_a.log redo02_a.log redo03_a.log
redo01.log redo02.log redo03.log
[oracle@wang ORA11GR2]$
7) 開啟資料庫
SQL> alter database open;
Database altered.
SQL> select status from v$instance;
STATUS
------------
OPEN
——再次驗證:
SQL> select group#,members,archived,status from v$log;
GROUP# MEMBERS ARC STATUS
---------- ---------- --- ----------------
1 2 YES INACTIVE
2 2 NO CURRENT
3 2 YES UNUSED
SQL> select group#,member from v$logfile;
GROUP# MEMBER
---------- --------------------------------------------------
3 /u01/app/oracle/oradata/ORA11GR2/redo03.log
2 /u01/app/oracle/oradata/ORA11GR2/redo02.log
1 /u01/app/oracle/oradata/ORA11GR2/redo01.log
1 /u01/app/oracle/oradata/ORA11GR2/redo01_a.log
2 /u01/app/oracle/oradata/ORA11GR2/redo02_a.log
3 /u01/app/oracle/oradata/ORA11GR2/redo03_a.log
6 rows selected.
完成!!!!!!!!!!!!!!!!!!!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31397003/viewspace-2126764/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle使用備份檔案集恢復歸檔日誌Oracle
- dg丟失歸檔,使用rman增量備份恢復
- DG歸檔日誌缺失恢復
- 【BBED】丟失歸檔檔案情況下的恢復
- 剪下的檔案還能恢復嗎,恢復剪貼丟失的檔案
- 測試在丟失歸檔日誌的情況下,跳過部分歸檔日誌進行資料恢復資料恢復
- oracle dg 歸檔日誌恢復情況Oracle
- 電腦檔案丟失資料恢復資料恢復
- 丟失的隨身碟檔案如何恢復?
- XFS檔案系統的備份、恢復、修復
- 12 使用RMAN備份和恢復檔案
- MySQL 日誌管理、備份與恢復MySql
- MySQL日誌管理,備份和恢復MySql
- 從備份片中恢復某個指定得歸檔或者資料檔案
- MySQL重做日誌恢復資料的流程MySql
- Sql Server資料庫檔案丟失的恢復方法SQLServer資料庫
- Linux中XFS檔案系統的備份,恢復,修復Linux
- 檔案的基本管理和XFS檔案系統備份恢復
- 如何從Active Backup for Business備份中恢復檔案
- 如何備份及恢復Linux檔案許可權Linux
- DATA GUARD主庫丟失資料檔案的恢復(3)
- DATA GUARD主庫丟失資料檔案的恢復(1)
- DATA GUARD主庫丟失資料檔案的恢復(2)
- 同名檔案替換怎麼恢復,恢復同名檔案
- RAC備份恢復之Voting備份與恢復
- 【北亞資料恢復】MongoDB資料遷移檔案丟失的MongoDB資料恢復案例資料恢復MongoDB
- 【資料庫資料恢復】mdb_catalog.wt檔案丟失的MongoDB資料恢復案例資料庫資料恢復MongoDB
- 【伺服器資料恢復】xfs檔案系統資料丟失的資料恢復案例伺服器資料恢復
- macOS Big Sur系統如何恢復丟失的資料檔案?Mac
- 實戰:xfs檔案系統的備份和恢復
- Sqlserver系統資料庫和使用者資料庫日誌檔案全部丟失的恢復SQLServer資料庫
- 【資料庫資料恢復】Sql Server資料庫檔案丟失的資料恢復過程資料庫資料恢復SQLServer
- word怎麼恢復儲存前的檔案,word檔案恢復
- 檔案替換後怎麼恢復,恢復被覆蓋的檔案
- 對歸檔模式下CLEAR 未歸檔日誌後恢復資料庫的一點看法模式資料庫
- 檔案中勒索恢復
- 【虛擬機器資料恢復】Hyper-V虛擬化檔案丟失的資料恢復案例虛擬機資料恢復
- 備份與恢復:polardb資料庫備份與恢復資料庫
- MySQL備份與恢復——基於Xtrabackup物理備份恢復MySql