欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

两个有趣的REDO LOG ERROR 处理方法

程序员文章站 2022-05-25 11:59:17
...

两个有趣的REDOLOGERROR处理方法系统环境:操作系统:AIX-5300数据库:Oracle10g(10.2.0.1.0)案例描述:数据库(归档模式)非当前日志组被破坏,但由于破坏方式不

两个有趣的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

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

相关标签: Oracle redo log