備份&恢復之十:損壞非當前聯機日誌
2008/05/08
備份&恢復之十:損壞非當前聯機日誌
測試環境:
1 作業系統:Redhat Linux 5
[oracle@mzl proc]$ cat /proc/version
Linux version 2.6.18-8.el5 (brewbuilder@ls20-bc2-14.build.redhat.com) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #1 SMP Fri Jan 26 14:15:21 EST 2007
2 資料庫版本:Oracle10g
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
3 設定成歸檔模式.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 268435456 bytes
Fixed Size 1218868 bytes
Variable Size 88082124 bytes
Database Buffers 171966464 bytes
Redo Buffers 7168000 bytes
Database mounted.
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 16
Current log sequence 18
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 16
Next log sequence to archive 18
Current log sequence 18
SQL>
4 當前的redo日誌為2
SQL> select group#,sequence#,archived,status from v$log;
GROUP# SEQUENCE# ARC STATUS
---------- ---------- --- ----------------
1 0 YES UNUSED
2 1 NO CURRENT
3 0 YES UNUSED
5 把日誌3移走,移動到資料夾“Old“中
[oracle@mzl orcl]$ mv redo03.log Old
6 關閉資料庫
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
7 啟動
SQL> startup
ORACLE instance started.
Total System Global Area 268435456 bytes
Fixed Size 1218868 bytes
Variable Size 88082124 bytes
Database Buffers 171966464 bytes
Redo Buffers 7168000 bytes
Database mounted.
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/orcl/redo03.log'
看alert_ORCL.log日誌:
Thu May 8 14:55:58 2008
ARC0: Archival started
ARC1: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC1 started with pid=17, OS id=6020
Thu May 8 14:55:58 2008
Errors in file /u01/app/oracle/admin/orcl/bdump/orcl_lgwr_5998.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/orcl/redo03.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Thu May 8 14:55:58 2008
Errors in file /u01/app/oracle/admin/orcl/bdump/orcl_lgwr_5998.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/orcl/redo03.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Thu May 8 14:55:58 2008
ARC0: STARTING ARCH PROCESSES
Thu May 8 14:55:58 2008
ARC1: Becoming the 'no FAL' ARCH
ARC1: Becoming the 'no SRL' ARCH
Thu May 8 14:55:58 2008
ORA-313 signalled during: ALTER DATABASE OPEN...
Thu May 8 14:55:58 2008
ARC2: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
ARC0: Becoming the heartbeat ARCH
ARC2 started with pid=18, OS id=6022
8 用CLEAR命令重建該日誌檔案
SQL> alter database clear logfile group 3;
Database altered.
開啟資料庫
SQL> alter database open;
Database altered.
說明:
1、如果損壞的是非當前的聯機日誌檔案,一般只需要clear就可以重建該日誌檔案,但是如果該資料庫處於歸檔狀態但該日誌還沒有歸檔,就需要強行clear。
2、建議clear,特別是強行clear後作一次資料庫的全備份。
3、此方法適用於歸檔與非歸檔資料庫
參考itpub上piner的備份與恢復案例:
http://www.itpub.net/viewthread.php?tid=126320&extra=page%3D4%26amp%3Bfilter%3Ddigest
在伺服器測試成功
備份&恢復之十:損壞非當前聯機日誌
測試環境:
1 作業系統:Redhat Linux 5
[oracle@mzl proc]$ cat /proc/version
Linux version 2.6.18-8.el5 (brewbuilder@ls20-bc2-14.build.redhat.com) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #1 SMP Fri Jan 26 14:15:21 EST 2007
2 資料庫版本:Oracle10g
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
3 設定成歸檔模式.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 268435456 bytes
Fixed Size 1218868 bytes
Variable Size 88082124 bytes
Database Buffers 171966464 bytes
Redo Buffers 7168000 bytes
Database mounted.
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 16
Current log sequence 18
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 16
Next log sequence to archive 18
Current log sequence 18
SQL>
4 當前的redo日誌為2
SQL> select group#,sequence#,archived,status from v$log;
GROUP# SEQUENCE# ARC STATUS
---------- ---------- --- ----------------
1 0 YES UNUSED
2 1 NO CURRENT
3 0 YES UNUSED
5 把日誌3移走,移動到資料夾“Old“中
[oracle@mzl orcl]$ mv redo03.log Old
6 關閉資料庫
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
7 啟動
SQL> startup
ORACLE instance started.
Total System Global Area 268435456 bytes
Fixed Size 1218868 bytes
Variable Size 88082124 bytes
Database Buffers 171966464 bytes
Redo Buffers 7168000 bytes
Database mounted.
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/orcl/redo03.log'
看alert_ORCL.log日誌:
Thu May 8 14:55:58 2008
ARC0: Archival started
ARC1: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC1 started with pid=17, OS id=6020
Thu May 8 14:55:58 2008
Errors in file /u01/app/oracle/admin/orcl/bdump/orcl_lgwr_5998.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/orcl/redo03.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Thu May 8 14:55:58 2008
Errors in file /u01/app/oracle/admin/orcl/bdump/orcl_lgwr_5998.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/orcl/redo03.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Thu May 8 14:55:58 2008
ARC0: STARTING ARCH PROCESSES
Thu May 8 14:55:58 2008
ARC1: Becoming the 'no FAL' ARCH
ARC1: Becoming the 'no SRL' ARCH
Thu May 8 14:55:58 2008
ORA-313 signalled during: ALTER DATABASE OPEN...
Thu May 8 14:55:58 2008
ARC2: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
ARC0: Becoming the heartbeat ARCH
ARC2 started with pid=18, OS id=6022
8 用CLEAR命令重建該日誌檔案
SQL> alter database clear logfile group 3;
Database altered.
開啟資料庫
SQL> alter database open;
Database altered.
說明:
1、如果損壞的是非當前的聯機日誌檔案,一般只需要clear就可以重建該日誌檔案,但是如果該資料庫處於歸檔狀態但該日誌還沒有歸檔,就需要強行clear。
2、建議clear,特別是強行clear後作一次資料庫的全備份。
3、此方法適用於歸檔與非歸檔資料庫
參考itpub上piner的備份與恢復案例:
http://www.itpub.net/viewthread.php?tid=126320&extra=page%3D4%26amp%3Bfilter%3Ddigest
在伺服器測試成功
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12778571/viewspace-263320/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 備份&恢復之十一:損壞當前聯機日誌
- 損壞聯機日誌 恢復
- 當前聯機日誌檔案損壞
- 聯機日誌損壞恢復實驗
- 損壞聯機日誌的恢復方法
- Oracle online redo log日誌 (當前或非當前日誌) 損壞之後的DB恢復Oracle
- 當前聯機日誌和其他聯機日誌恢復的區別
- 【備份與恢復】恢復受損的複用聯機重做日誌檔案
- 非系統表空間損壞,rman備份恢復
- 聯機日誌檔案損壞後的恢復方法[轉帖]
- 【備份與恢復】重建受損的聯機重做日誌檔案成員
- 非系統資料檔案損壞,rman備份恢復
- 當前日誌組全部損壞的恢復
- 備份&恢復之十三:損壞全部控制檔案
- REDO日誌損壞,非歸檔模式資料檔案恢復模式
- 備份&恢復之十二:損壞單個控制檔案
- Oracle塊損壞恢復(有rman備份)Oracle
- 聯機日誌檔案損壞問題
- 【備份恢復】 恢復重做日誌組成員
- rman恢復:資料檔案丟失,控制檔案丟失,聯機日誌檔案丟失(非當前使用與當前使用)
- MySQL日誌管理,備份和恢復MySql
- MySQL 日誌管理、備份與恢復MySql
- Oracle備份恢復之熱備份恢復及異機恢復Oracle
- 備份&恢復之四:非歸檔模式下的備份與恢復模式
- 一次日誌檔案損壞的恢復
- Sql server日誌損壞後的資料恢復(轉)SQLServer資料恢復
- 備份與恢復--從備份的歸檔日誌中恢復資料
- 磁碟損壞造成RMAN備份檔案有壞塊的恢復案例
- Oracle中的聯機日誌檔案發生不同程度損壞的恢Oracle
- Oracle 聯機備份 離線備份 物理備份 恢復Oracle
- 【備份恢復】set newname切換日誌
- 冷備份+歸檔日誌的恢復
- inactive狀態日誌組檔案損壞的恢復
- 備份與恢復--資料檔案損壞或丟失
- 備份恢復之redo日誌組member成員丟失
- rman恢復--丟失聯機重做日誌的恢復
- 線上日誌檔案損壞恢復方法
- 備份與恢復--重建控制檔案後資料檔案損壞的恢復