测试隐含参数_disable_logging带来的后果(一)

今天闲来无事,看到一个隐含参数_disable_logging,号称能阻止Oracle写redo log,一时手痒,结果弄出问题了。在这里要说的是,严禁在生产库中使用该参数。
该参数在默认情况下为false。
_disable_logging FALSE Disable logging
现在将其置为true,然后重启一把,然后切换几个日志,事情就慢慢搞大了
[quote]SQL> alter system set "_disable_logging"=true scope=spfile;

System altered.

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

Total System Global Area 327155712 bytes
Fixed Size 2083752 bytes
Variable Size 209716312 bytes
Database Buffers 109051904 bytes
Redo Buffers 6303744 bytes
Database mounted.
Database opened.

SQL> alter system switch logfile;

System altered.

SQL> /

System altered.[/quote]

当切换到第三个日志的时候,会话处于挂住状态
[quote]SQL> /
alter system switch logfile
*
ERROR at line 1:
ORA-01013: user requested cancel of current operation[/quote]

查看alert日志,已经再报redo头损坏。。。
[quote]Fri Jan 7 15:01:42 2011
Errors in file /ora10/admin/ldbra/bdump/ldbra_arc1_21510.trc:
ORA-00354: corrupt redo log block header
ORA-00353: log corruption near block 71038 change 10783758842576 time 01/07/2011 14:45:47
ORA-00312: online log 3 thread 1: '/oradata/ldbra/redo03.log'
ARC1: All Archive destinations made inactive due to error 354
Fri Jan 7 15:01:42 2011
ARC1: Closing local archive destination LOG_ARCHIVE_DEST_1: '/ora10/oracle/product/10.2.0/db_1/dbs/arch1_1836_715078399.dbf' (error 354)
(ldbra)
Committing creation of archivelog '/ora10/oracle/product/10.2.0/db_1/dbs/arch1_1836_715078399.dbf' (error 354)[/quote]

数据库重启也包redolog头损坏,悲剧开始
[quote]SQL> alter system set "_disable_logging"=false scope=spfile;

System altered.

SQL> startup force
ORACLE instance started.

Total System Global Area 327155712 bytes
Fixed Size 2083752 bytes
Variable Size 209716312 bytes
Database Buffers 109051904 bytes
Redo Buffers 6303744 bytes
Database mounted.
ORA-16038: log 3 sequence# 1836 cannot be archived
ORA-00354: corrupt redo log block header
ORA-00312: online log 3 thread 1: '/oradata/ldbra/redo03.log'[/quote]
还好是测试库,再次用隐含参数_allow_resetlogs_corruption,成功将数据库打开。
[quote]SQL> alter system set "_allow_resetlogs_corruption"=true scope=spfile;

System altered.

SQL> startup force
ORACLE instance started.

Total System Global Area 327155712 bytes
Fixed Size 2083752 bytes
Variable Size 209716312 bytes
Database Buffers 109051904 bytes
Redo Buffers 6303744 bytes
Database mounted.
ORA-16038: log 3 sequence# 1836 cannot be archived
ORA-00354: corrupt redo log block header
ORA-00312: online log 3 thread 1: '/oradata/ldbra/redo03.log'


SQL> recover database until cancel;
Media recovery complete.
SQL> alter database open resetlogs;

Database altered.[/quote]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值