中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

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

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

兩個有趣的REDO LOG ERROR 處理方法

發布時間:2020-06-24 02:09:25 來源:網絡 閱讀:2419 作者:客居天涯 欄目:關系型數據庫

兩個有趣的REDO LOG ERROR處理方法

系統環境:

操作系統: AIX-5300

數據庫:   Oracle 10g(10.2.0.1.0)


    案例描述:

       數據庫(歸檔模式)非當前日志組被破壞,但由于破壞方式不同,在解決問題的方式稍有不同,很有意思.


案例1:非當前日志組文件被刪除

SQL> select member from v$logfile;

MEMBER

--------------------------------------------------------------------------------------------------------

/dsk1/oradata/prod/redo03a.log

/dsk1/oradata/prod/redo02a.log

/dsk1/oradata/prod/redo01a.log

/dsk2/oradata/prod/redo01b.log

/dsk2/oradata/prod/redo02b.log

/dsk2/oradata/prod/redo03b.log

6 rows selected.

刪除非當前日志組:

[oracle@aix211 ~]$cd /dsk1/oradata/prod/

[oracle@aix211 prod]$ls

control02.ctl  redo01a.log    redo02a.log    redo03a.log

[oracle@aix211 prod]$rm redo01a.log 

[oracle@aix211 prod]$cd /dsk2/oradata/prod/

[oracle@aix211 prod]$ls

redo01b.log  redo02b.log  redo03b.log

[oracle@aix211 prod]$rm redo01b.log 

關閉數據庫,并重新啟動:

SQL> shutdown abort

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area 1258291200 bytes

Fixed Size                  2020552 bytes

Variable Size             318769976 bytes

Database Buffers          922746880 bytes

Redo Buffers               14753792 bytes

Database mounted.

ORA-00313: open failed for members of log group 1 of thread 1

ORA-00312: online log 1 thread 1: '/dsk1/oradata/prod/redo01a.log'

ORA-00312: online log 1 thread 1: '/dsk2/oradata/prod/redo01b.log'

告警日志:(提示:日志組文件找不到,無法讀取)

Errors in file /u01/app/oracle/admin/prod/udump/prod_ora_536600.trc:

ORA-00313: open failed for members of log group 1 of thread 1

ORA-00312: online log 1 thread 1: '/dsk2/oradata/prod/redo01b.log'

ORA-27037: unable to obtain file status

IBM AIX RISC System/6000 Error: 2: No such file or directory

Additional information: 3

ORA-00312: online log 1 thread 1: '/dsk1/oradata/prod/redo01a.log'

ORA-27037: unable to obtain file status

IBM AIX RISC System/6000 Error: 2: No such file or directory

Additional information: 3

Completed: alter database clear logfile group 1

Mon May 26 10:02:36 2014

alter database open

Mon May 26 10:02:36 2014

Block change tracking file is current.

解決方法:

SQL> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM

---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------

         1          1        452   52428800          2 YES INACTIVE                806225 26-MAY-14

         3          1        451   52428800          2 YES INACTIVE                803970 26-MAY-14

         2          1        453   52428800          2 NO  CURRENT                 806237 26-MAY-14

由于是非當前日志組,并且已經完成歸檔:

SQL> alter database clear logfile group 1;

Database altered.

打開數據庫成功:

SQL> alter database open;

Database altered.

SQL> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM

---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------

         1          1        454   52428800          2 NO  CURRENT                 826578 26-MAY-14

         2          1        453   52428800          2 YES INACTIVE                806237 26-MAY-14

         3          1        451   52428800          2 YES INACTIVE                803970 26-MAY-14

SQL> alter system switch logfile;

System altered.


案例2:非當前日志組文件頭部被破壞

[oracle@aix211 prod]$dd if=/dev/zero of=/dsk1/oradata/prod/redo03a.log bs=8192 count=3

3+0 records in

3+0 records out

[oracle@aix211 prod]$dd if=/dev/zero of=/dsk2/oradata/prod/redo03b.log bs=8192 count=3

3+0 records in

3+0 records out

關庫并啟動Instance:

SQL> shutdown abort;

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area 1258291200 bytes

Fixed Size                  2020552 bytes

Variable Size             318769976 bytes

Database Buffers          922746880 bytes

Redo Buffers               14753792 bytes

Database mounted.

ORA-00316: log 3 of thread 1, type  in header is not log file

ORA-00312: online log 3 thread 1: '/dsk1/oradata/prod/redo03a.log'

ORA-00312: online log 3 thread 1: '/dsk2/oradata/prod/redo03b.log'

告警日志:(提示:日志組文件頭部不可讀取)

Errors in file /u01/app/oracle/admin/prod/bdump/prod_lgwr_499718.trc:

ORA-00316: log 3 of thread 1, type 0 in header is not log file

ORA-00312: online log 3 thread 1: '/dsk2/oradata/prod/redo03b.log'

ORA-00316: log 3 of thread 1, type 0 in header is not log file

ORA-00312: online log 3 thread 1: '/dsk1/oradata/prod/redo03a.log'

Mon May 26 10:16:37 2014

解決方法:

Clear非當前日志組:

SQL> select * from v$log;                 

    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM

---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------

         1          1        457   52428800          2 YES INACTIVE                827041 26-MAY-14

         3          1        458   52428800          2 YES INACTIVE                827053 26-MAY-14

         2          1        459   52428800          2 NO  CURRENT                 827067 26-MAY-14

SQL> alter database clear logfile group 3;

Database altered.

直接open database失敗

SQL> alter database open;

alter database open

*

ERROR at line 1:

ORA-00327: log 3 of thread 1, physical size  less than needed

ORA-00312: online log 3 thread 1: '/dsk1/oradata/prod/redo03a.log'

ORA-00312: online log 3 thread 1: '/dsk2/oradata/prod/redo03b.log'

告警日志:(提示:redo 日志組文件頭部仍然有錯誤)

Errors in file /u01/app/oracle/admin/prod/bdump/prod_lgwr_499718.trc:

ORA-00316: log 3 of thread 1, type 0 in header is not log file

ORA-00312: online log 3 thread 1: '/dsk2/oradata/prod/redo03b.log'

ORA-00316: log 3 of thread 1, type 0 in header is not log file

ORA-00312: online log 3 thread 1: '/dsk1/oradata/prod/redo03a.log'

Mon May 26 10:16:37 2014

ARC0: STARTING ARCH PROCESSES

Mon May 26 10:16:37 2014

ORA-316 signalled during: ALTER DATABASE OPEN...

重新啟動Instance,重新加載controlfile,問題解決:

SQL> startup force;

ORACLE instance started.

Total System Global Area 1258291200 bytes

Fixed Size                  2020552 bytes

Variable Size             318769976 bytes

Database Buffers          922746880 bytes

Redo Buffers               14753792 bytes

Database mounted.

Database opened.

SQL> 


   以上兩個案例都是針對redo log文件被破壞的情況下,解決問題的方法,破壞方式稍有不同,解決方法也有差異,應在實踐中注意總結和歸納。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

山东省| 关岭| 桂林市| 上饶市| 沾化县| 萍乡市| 邵东县| 利辛县| 大宁县| 湟中县| 兴国县| 晋州市| 博罗县| 安国市| 玉林市| 宽甸| 定南县| 犍为县| 江源县| 怀集县| 东兰县| 紫云| 苏尼特左旗| 离岛区| 军事| 秀山| 同德县| 武隆县| 衡阳县| 大安市| 西安市| 沅江市| 嘉善县| 琼中| 石首市| 常宁市| 金秀| 遂溪县| 闸北区| 措美县| 盘山县|