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

« ORA-00600 [2662]错误解决过程 | Blog首页 | Oracle Hidden Parameter:_allow_resetlogs_corruption »

Oracle Hidden Parameter:_disable_logging
modb.pro

提示:Oracle的隐含参数只应该在测试环境或者在Oracle Support的支持下使用。
从Oracle的系统表中,我们知道Oracle存在一个隐含参数_disable_logging可以用于禁用日志生成,这个参数显然只能用于测试目的(可以极大提高Benchmark测试的性能),禁止日志生成必然导致事务的不可恢复性,而且会导致日志文件损坏。
SQL> select ksppinm,ksppdesc from x$ksppi where ksppinm like '%logging';

KSPPINM              KSPPDESC
-------------------- ------------------------------
_disable_logging     Disable logging

因为特殊的需要,对这个参数进行了一点简单测试:

1.设置参数
[oracle@jumper bdump]$ sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.4.0 - Production on Wed Oct 19 11:01:19 2005

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


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

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

System altered.

2.事务测试
SQL> create table t as select * from dba_users;

Table created.

SQL> select count(*) from t;

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

SQL> shutdown abort;
ORACLE instance shut down.
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

由于未产生相应日志,数据库crash或shutdown abort之后,上一次成功完成的检查点之后变化的数据将无法恢复。
3.观察alert文件
从日志中我们可以看到在instance recovery中,没有数据被恢复,只有成功完成的上次检查点之前数据可以被获取,之后数据都将丢失。
Wed Oct 19 20:38:38 2005
Beginning crash recovery of 1 threads
Wed Oct 19 20:38:38 2005
Started first pass scan
Wed Oct 19 20:38:39 2005
Completed first pass scan
 0 redo blocks read, 0 data blocks need recovery
Wed Oct 19 20:38:39 2005
Started recovery at
 Thread 1: logseq 2, block 201, scn 0.897632464
Recovery of Online Redo Log: Thread 1 Group 1 Seq 2 Reading mem 0
  Mem# 0 errs 0: /opt/oracle/oradata/conner/redo01.log
Wed Oct 19 20:38:39 2005
Completed redo application
Wed Oct 19 20:38:39 2005
Ended recovery at
 Thread 1: logseq 2, block 201, scn 0.897652465
 0 data blocks read, 0 data blocks written, 0 redo blocks read
Crash recovery completed successfully


历史上的今天...
    >> 2011-10-19文章:
    >> 2010-10-19文章:
    >> 2009-10-19文章:
    >> 2006-10-19文章:

By eygle on 2005-10-19 20:50 | Comments (1) | Internal | 481 |

1 Comment

我倒是更想知道,可以极大提高Benchmark测试的性能,这个性能的提高有多少?
eygle能不能作个测试?


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