Oracle Hidden Parameter:_allow_resetlogs_corruption

提示:Oracle的隐含参数只应该在测试环境或者在Oracle Support的支持下使用。
在使用_disable_logging进一步的测试中,试图通过switch logfile进行日志切换,结果重起居然报出日志文件损坏。

SQL> startup
ORACLE instance started.

Total System Global Area   97588504 bytes
Fixed Size                   451864 bytes
Variable Size              33554432 bytes
Database Buffers           62914560 bytes
Redo Buffers                 667648 bytes
Database mounted.
Database opened.
SQL> select count(*) from t;
select count(*) from t
                     *
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> create table t as select * from dba_users;

Table created.

SQL> select count(*) from t;

  COUNT(*)
----------
        12



试图通过switch logfile触发检查点:

SQL> alter system switch logfile;

System altered.


SQL> insert into t select * from t;

12 rows created.

SQL> commit;

Commit complete.

SQL> select count(*) from t;

  COUNT(*)
----------
        24



日志文件损坏(未测试是否可以重复出现):

SQL> startup force;
ORACLE instance started.

Total System Global Area   97588504 bytes
Fixed Size                   451864 bytes
Variable Size              33554432 bytes
Database Buffers           62914560 bytes
Redo Buffers                 667648 bytes
Database mounted.
ORA-00354: corrupt redo log block header
ORA-00353: log corruption near block 3 change 897612314 time 10/19/2005 14:19:34
ORA-00312: online log 3 thread 1: '/opt/oracle/oradata/conner/redo03.log'



损坏的是active的日志文件:

SQL> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
         1          1        159   10485760          1 NO  INACTIVE             897592312 19-OCT-05
         2          1        158   10485760          1 NO  INACTIVE             897572310 19-OCT-05
         3          1        160   10485760          1 NO  ACTIVE               897612314 19-OCT-05
         4          1        161    1048576          1 NO  CURRENT              897612440 19-OCT-05
只好使用另外一个隐含参数_allow_resetlogs_corruption强制启动数据库,设置此参数之后,在数据库Open过程中,Oracle会跳过某些一致性检查,从而使数据库可能跳过不一致状态,Open打开:

相关推荐