溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

Oracle 10.2.0.5 非歸檔current redolog損壞處理一例

發(fā)布時(shí)間:2020-05-28 13:08:57 來源:網(wǎng)絡(luò) 閱讀:1261 作者:koumm 欄目:關(guān)系型數(shù)據(jù)庫

操作系統(tǒng): RHEL5.8 x64
數(shù)據(jù)庫  : Oracle 10.2.0.5.0
故障情況:
一臺(tái)單機(jī)曙光PC服務(wù)器4塊300G SAS盤,RAID5壞兩塊磁盤(服務(wù)器面板無故障提示,無人發(fā)現(xiàn)),造成RAID5磁盤陣列掛掉,操作系統(tǒng)當(dāng)機(jī),系統(tǒng)無法啟動(dòng)。經(jīng)過數(shù)據(jù)恢復(fù)公司將磁盤數(shù)據(jù)恢復(fù)后,重新恢復(fù)數(shù)據(jù)文件,啟動(dòng)數(shù)據(jù)庫時(shí)發(fā)現(xiàn)如下錯(cuò)誤提示:

1. 數(shù)據(jù)庫警告日志

tail -f alert_orcl.log

Database mounted in Exclusive Mode
Completed: ALTER DATABASE   MOUNT
Sat Sep 16 02:32:44 CST 2017
ALTER DATABASE OPEN
Sat Sep 16 02:32:44 CST 2017
Beginning crash recovery of 1 threads
 parallel recovery started with 2 processes
Sat Sep 16 02:32:44 CST 2017
Started redo scan
Sat Sep 16 02:32:44 CST 2017
Errors in file /u01/app/oracle/admin/orcl/udump/orcl_ora_27990.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-27046: file size is not a multiple of logical block size
Additional information: 1
Sat Sep 16 02:32:44 CST 2017
Aborting crash recovery due to error 313
Sat Sep 16 02:32:44 CST 2017
Errors in file /u01/app/oracle/admin/orcl/udump/orcl_ora_27990.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-27046: file size is not a multiple of logical block size
Additional information: 1
ORA-313 signalled during: ALTER DATABASE OPEN...


2. 啟動(dòng)時(shí)提示

[oracle@tcdb ~]$ sqlplus / as sysdba;

SQL*Plus: Release 10.2.0.5.0 - Production on 6 02:28:33 2017

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

Connected to an idle instance.

SQL> startup;
ORACLE instance started.

Total System Global Area 1610612736 bytes
Fixed Size                  2096632 bytes
Variable Size             553648648 bytes
Database Buffers         1040187392 bytes
Redo Buffers               14680064 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'
ORA-27046: file size is not a multiple of logical block size
Additional information: 1

SQL>

根據(jù)情況是數(shù)據(jù)庫非規(guī)檔,redo文件損壞,故障時(shí)早上7點(diǎn)時(shí)間。

SQL> select open_mode from v$database;

OPEN_MODE
----------
MOUNTED

SQL> set pagesize 999;
SQL> set linesize 200;
SQL> alter session set nls_date_format='yyyy-mm-dd hh34:mi:ss';
Session altered.

SQL> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIME
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- -------------------
         1          1       3406   52428800          1 NO  INACTIVE             187001363 2017-08-20 07:02:30
         3          1       3408   52428800          1 NO  CURRENT              187084379 2017-08-21 07:03:24
         2          1       3407   52428800          1 NO  INACTIVE             187044837 2017-08-20 19:40:06

當(dāng)前日志損壞

SQL>
SQL> create pfile from spfile;

File created.


在pfile中加入隱含參數(shù):
*._allow_resetlogs_corruption=true
*._allow_error_simulation=true


SQL> startup mount pfile='/u01/app/oracle/product/10.2.0/db_1/dbs/initorcl.ora'
ORACLE instance started.

Total System Global Area 1610612736 bytes
Fixed Size                  2096632 bytes
Variable Size             553648648 bytes
Database Buffers         1040187392 bytes
Redo Buffers               14680064 bytes
Database mounted.

再次嘗試resetlogs打開數(shù)據(jù)庫

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery


SQL> recover database until cancel;
ORA-00279: change 187084379 generated at 08/21/2017 07:03:24 needed for thread 1
ORA-00289: suggestion : /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2017_10_18/o1_mf_1_3408_%u_.arc
ORA-00280: change 187084379 for thread 1 is in sequence #3408


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00308: cannot open archived log '/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2017_10_18/o1_mf_1_3408_%u_.arc'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3


ORA-00308: cannot open archived log '/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2017_10_18/o1_mf_1_3408_%u_.arc'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3


ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'


SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-00603: ORACLE server session terminated by fatal error


alter日志報(bào)如下錯(cuò)誤:

Wed Oct 18 03:06:38 CST 2017
Errors in file /u01/app/oracle/admin/orcl/udump/orcl_ora_18057.trc:
ORA-00600: internal error code, arguments: [2662], [0], [187086068], [0], [187092671], [8388617], [], []
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [2662], [0], [187086066], [0], [187092671], [8388617], [], []
Wed Oct 18 03:06:39 CST 2017
Errors in file /u01/app/oracle/admin/orcl/udump/orcl_ora_18057.trc:
ORA-00600: internal error code, arguments: [2662], [0], [187086069], [0], [187092671], [8388617], [], []
ORA-00600: internal error code, arguments: [2662], [0], [187086068], [0], [187092671], [8388617], [], []
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [2662], [0], [187086066], [0], [187092671], [8388617], [], []
Wed Oct 18 03:06:40 CST 2017
Errors in file /u01/app/oracle/admin/orcl/udump/orcl_ora_18057.trc:
ORA-00600: internal error code, arguments: [2662], [0], [187086069], [0], [187092671], [8388617], [], []
ORA-00600: internal error code, arguments: [2662], [0], [187086068], [0], [187092671], [8388617], [], []
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [2662], [0], [187086066], [0], [187092671], [8388617], [], []

[2662]需要推進(jìn)SCN,使SCN到一致的狀態(tài)。

SQL> conn /as sysdba
Connected to an idle instance.

SQL>  startup mount pfile='/u01/app/oracle/product/10.2.0/db_1/dbs/initorcl.ora';
ORACLE instance started.

Total System Global Area  167772160 bytes
Fixed Size                  1272600 bytes
Variable Size              96470248 bytes
Database Buffers           67108864 bytes
Redo Buffers                2920448 bytes
Database mounted.

SQL> alter session set events '10015 trace name adjust_scn level 1';
Session altered.

SQL> alter database open;
Database altered.

注:之后要去掉兩個(gè)參數(shù),create spfile from pfile;

數(shù)據(jù)庫正常啟動(dòng),當(dāng)前redo日志損壞,理論上會(huì)造成數(shù)據(jù)丟失,考慮到早7點(diǎn),應(yīng)用未有業(yè)務(wù)數(shù)據(jù)產(chǎn)生,觀察應(yīng)用以及測(cè)試功能正常,故未對(duì)數(shù)據(jù)庫進(jìn)行邏輯重建。


向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI