eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« Oracle初学者入门指南-系统与用户数据分离 | Blog首页 | Dell的2850 + Oracle10gR2 I/O性能测试 »

隐含参数_disable_logging的几点说明
modb.pro

在很久以前,曾经介绍过Oracle的一个内部隐含参数_disable_logging,看到有朋友论述这个参数,今天忍不住做一点补充说明.

1.当然,隐含有风险,设置请谨慎.

2.最初在9.2.0.6 Solaris版本上,设置该参数会触发Bug:3868748 使得数据库无法启动.

从警告日志中,通常可以获得的错误提示是:

ORA-07445: exception encountered:
core dump [kcrfwcint()+1625] [SIGFPE] [Integer divide by zero] [0x828739D] [] []

但是好在这个参数是动态的,在存在Bug版本中,我们可以修改数据库当前值来进行测试:

SQL> alter system set "_disable_logging"=true scope=memory;

System altered.

3.这个Bug的影响范围并非全部,9.2.0.6之下,Oracle9.2.0.5,Oracle9.2.0.4等,都不受这个Bug影响.Oracle声称的修正该Bug的版本是Oracle10gR2(我未验正).

4.这个参数在Oracle9.2.0.4版本的Linux/Solaris上是不存在这个Bug的.在我的环境中经过验证,过程请参考(附注1).

5.在归档模式下,设置该参数会导致日志文件损坏.因为在设置该参数与归档原则违背,归档进程无法识别该日志文件格式,会将该日志文件标记为损坏.所以需要谨慎测试,具体请参考(附注2).

附注1:Solaris Oracle9.2.0.4设置测试过程:

$ sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.4.0 - Production on Thu Apr 13 22:51:24 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production

SQL> show parameter disa

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
_disable_logging boolean FALSE
SQL> alter system set "_disable_logging"=true scope=both;

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 286755168 bytes
Fixed Size 731488 bytes
Variable Size 167772160 bytes
Database Buffers 117440512 bytes
Redo Buffers 811008 bytes
Database mounted.
Database opened.
SQL> show parameter disable

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
_disable_logging boolean TRUE
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
PL/SQL Release 9.2.0.4.0 - Production
CORE 9.2.0.3.0 Production
TNS for Solaris: Version 9.2.0.4.0 - Production
NLSRTL Version 9.2.0.4.0 - Production

附注2:归档模式下,该参数会导致日志文件损坏.

设置该参数后,切换日志:

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /opt/oracle/oradata/conner/archive
Oldest online log sequence 20
Next log sequence to archive 23
Current log sequence 23
SQL> alter system switch logfile;

System altered.

SQL> select group#,status from v$Log;

GROUP# STATUS
---------- ----------------
1 INACTIVE
2 ACTIVE
3 INACTIVE
4 CURRENT

SQL> show parameter disable

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
_disable_logging boolean TRUE

此时可以在警告日志中看到日志损坏的错误信息:

Thu Apr 13 23:33:25 2006
ARC0: Evaluating archive log 2 thread 1 sequence 23
ARC0: Beginning to archive log 2 thread 1 sequence 23
Creating archive destination LOG_ARCHIVE_DEST_1: '/opt/oracle/oradata/conner/archive/1_23.dbf'
ARC0: Log corruption near block 3849 change 0 time ?
ARC0: All Archive destinations made inactive due to error 354

Thu Apr 13 23:33:25 2006
Errors in file /opt/oracle/admin/conner/bdump/conner_arc0_21506.trc:
ORA-00354: corrupt redo log block header
ORA-00353: log corruption near block 3849 change 0 time 04/13/2006 21:13:03
ORA-00312: online log 2 thread 1: '/opt/oracle/oradata/conner/redo02.log'
ARC0: Archiving not possible: error count exceeded
ARC0: Failed to archive log 2 thread 1 sequence 23
ARCH: Archival stopped, error occurred. Will continue retrying
Thu Apr 13 23:33:26 2006
ORACLE Instance conner - Archival Error
ARCH: Connecting to console port...
Thu Apr 13 23:33:26 2006
ORA-16038: log 2 sequence# 23 cannot be archived
ORA-00354: corrupt redo log block header
ORA-00312: online log 2 thread 1: '/opt/oracle/oradata/conner/redo02.log'
ARCH: Connecting to console port...
ARCH:
Thu Apr 13 23:33:26 2006
ORA-16038: log 2 sequence# 23 cannot be archived
ORA-00354: corrupt redo log block header
ORA-00312: online log 2 thread 1: '/opt/oracle/oradata/conner/redo02.log'

历史上的今天...
    >> 2008-06-20文章:
    >> 2007-06-20文章:
    >> 2005-06-20文章:
           The Butterfly Effect

By eygle on 2006-06-20 11:27 | Comments (0) | Internal | 797 |


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com