分享
 
 
 

当前日志损坏的案例(二)

王朝other·作者佚名  2006-04-07
窄屏简体版  字體: |||超大  

设置两个隐含参数:_ALLOW_RESETLOGS_CORRUPTION = TRUE 和 _corrupted_rollback_segments ,因为redo损坏的时候,undo数据也大都不一致了。

使用隐含参数启动数据库:

SQL> create pfile='/home/oracle/pfile.tmp' from spfile;

File created.

SQL>

SQL> shutdown immediate;

ORA-01109: database not open

Database dismounted.

ORACLE instance shut down.

SQL>

[oracle@ts01 oracle]$ tail pfile.tmp

*.sort_area_size=524288

*.star_transformation_enabled='FALSE'

*.timed_statistics=TRUE

*.undo_management='AUTO'

*.undo_retention=10800

*.undo_tablespace='UNDOTBS2'

*.user_dump_dest='/oracle/admin/TSMISC02/udump'

_ALLOW_RESETLOGS_CORRUPTION = TRUE

[oracle@ts01 oracle]$

这个参数的解释:

SQL> select KSPPDESC from X$KSPPI where ksppinm='_allow_resetlogs_corruption';

KSPPDESC

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

allow resetlogs even if it will cause corruption

SQL>

[oracle@ts01 oracle]$ sqlplus '/ as sysdba'

SQL*Plus: Release 9.2.0.4.0 - Production on Mon Nov 21 15:57:21 2005

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

Connected to an idle instance.

SQL> startup mount pfile=pfile.tmp

ORACLE instance started.

Total System Global Area 236000356 bytes

Fixed Size 451684 bytes

Variable Size 201326592 bytes

Database Buffers 33554432 bytes

Redo Buffers 667648 bytes

Database mounted.

SQL>

SQL> alter database open resetlogs;

alter database open resetlogs

*

ERROR at line 1:

ORA-01139: RESETLOGS option only valid after an incomplete database recovery

SQL> select status from v$instance;

STATUS

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

MOUNTED

SQL> alter database open;

alter database open

*

ERROR at line 1:

ORA-00316: log 1 of thread 1, type 0 in header is not log file

ORA-00312: online log 1 thread 1: '/oracle/oradata/TSMISC02/redo01.log'

SQL>

SQL> recover database using backup controlfile until cancel;

ORA-00279: change 658443 generated at 11/15/2005 08:52:17 needed for thread 1

ORA-00289: suggestion : /oracle/oradata/TSMISC02/archive/1_62.dbf

ORA-00280: change 658443 for thread 1 is in sequence #62

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

cancel

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below

ORA-01194: file 1 needs more recovery to be consistent

ORA-01110: data file 1: '/oracle/oradata/TSMISC02/system01.dbf'

ORA-01112: media recovery not started

SQL> alter database open resetlogs;

。。。

很长时间,就好像hang住了

。。。

有过了一会:

SQL> alter database open resetlogs;

alter database open resetlogs

*

ERROR at line 1:

ORA-03113: end-of-file on communication channel

SQL>

SQL> select status from v$instance;

select status from v$instance

*

ERROR at line 1:

ORA-03114: not connected to ORACLE

SQL> conn / as sysdba

Connected to an idle instance.

SQL>

检查日志,发现:

[oracle@ts01 bdump]$ tail alert_TSMISC02.log

Errors in file /oracle/admin/TSMISC02/udump/tsmisc02_ora_10762.trc:

ORA-00600: internal error code, arguments: [2662], [0], [658448], [0], [664313], [12582921], [], []

Mon Nov 21 16:11:44 2005

Errors in file /oracle/admin/TSMISC02/udump/tsmisc02_ora_10762.trc:

ORA-00600: internal error code, arguments: [2662], [0], [658448], [0], [664313], [12582921], [], []

Mon Nov 21 16:11:44 2005

Error 600 happened during db open, shutting down database

USER: terminating instance due to error 600

Instance terminated by USER, pid = 10762

ORA-1092 signalled during: alter database open resetlogs...

[oracle@ts01 bdump]$

设置event adjust_scn:

alter session set events '10015 trace name adjust_scn level 1';

SQL> conn / as sysdba

Connected to an idle instance.

SQL> startup mount pfile=pfile.tmp

ORACLE instance started.

Total System Global Area 236000356 bytes

Fixed Size 451684 bytes

Variable Size 201326592 bytes

Database Buffers 33554432 bytes

Redo Buffers 667648 bytes

Database mounted.

SQL>

SQL> alter session set events '10015 trace name adjust_scn level 1';

Session altered.

SQL>

SQL> recover database using backup controlfile until cancel;

ORA-00279: change 658445 generated at 11/21/2005 16:11:43 needed for thread 1

ORA-00289: suggestion : /oracle/oradata/TSMISC02/archive/1_1.dbf

ORA-00280: change 658445 for thread 1 is in sequence #1

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

cancel

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below

ORA-01194: file 1 needs more recovery to be consistent

ORA-01110: data file 1: '/oracle/oradata/TSMISC02/system01.dbf'

ORA-01112: media recovery not started

SQL> alter database open resetlogs;

alter database open resetlogs

*

ERROR at line 1:

ORA-01092: ORACLE instance terminated. Disconnection forced

SQL>

检查日志:

[oracle@ts01 bdump]$ tail alert_TSMISC02.log

Errors in file /oracle/admin/TSMISC02/udump/tsmisc02_ora_10762.trc:

ORA-00600: internal error code, arguments: [2662], [0], [658448], [0], [664313], [12582921], [], []

Mon Nov 21 16:11:44 2005

Errors in file /oracle/admin/TSMISC02/udump/tsmisc02_ora_10762.trc:

ORA-00600: internal error code, arguments: [2662], [0], [658448], [0], [664313], [12582921], [], []

Mon Nov 21 16:11:44 2005

Error 600 happened during db open, shutting down database

USER: terminating instance due to error 600

Instance terminated by USER, pid = 10762

ORA-1092 signalled during: alter database open resetlogs...

[oracle@ts01 bdump]$ tail alert_TSMISC02.log

Recovery of Online Redo Log: Thread 1 Group 1 Seq 1 Reading mem 0

Mem# 0 errs 0: /oracle/oradata/TSMISC02/redo01.log

Mon Nov 21 16:21:41 2005

Errors in file /oracle/admin/TSMISC02/udump/tsmisc02_ora_10795.trc:

ORA-00607: Internal error occurred while making a change to a data block

ORA-00600: internal error code, arguments: [4194], [91], [69], [], [], [], [], []

Error 607 happened during db open, shutting down database

USER: terminating instance due to error 607

Instance terminated by USER, pid = 10795

ORA-1092 signalled during: alter database open resetlogs...

[oracle@ts01 bdump]$ tail -f alert_TSMISC02.log

Recovery of Online Redo Log: Thread 1 Group 1 Seq 1 Reading mem 0

Mem# 0 errs 0: /oracle/oradata/TSMISC02/redo01.log

Mon Nov 21 16:21:41 2005

Errors in file /oracle/admin/TSMISC02/udump/tsmisc02_ora_10795.trc:

ORA-00607: Internal error occurred while making a change to a data block

ORA-00600: internal error code, arguments: [4194], [91], [69], [], [], [], [], []

Error 607 happened during db open, shutting down database

USER: terminating instance due to error 607

Instance terminated by USER, pid = 10795

ORA-1092 signalled during: alter database open resetlogs...

[oracle@ts01 bdump]$

设置隐含参数:

将undo改变成手工管理的,然后重启数据库,

SQL> show parameter undo

NAME TYPE VALUE

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

undo_management string MANUEL

undo_retention integer 10800

undo_suppress_errors boolean FALSE

undo_tablespace string UNDOTBS2

SQL>

[oracle@ts01 oracle]$ tail pfile.tmp

*.undo_management='AUTO'

*.undo_retention=10800

*.undo_tablespace='UNDOTBS2'

*.user_dump_dest='/oracle/admin/TSMISC02/udump'

*._ALLOW_RESETLOGS_CORRUPTION = TRUE

*.undo_management='manual'

[oracle@ts01 oracle]$

[oracle@ts01 oracle]$ exit

exit

SQL> startup pfile=pfile.tmp

ORACLE instance started.

Total System Global Area 236000356 bytes

Fixed Size 451684 bytes

Variable Size 201326592 bytes

Database Buffers 33554432 bytes

Redo Buffers 667648 bytes

Database mounted.

Database opened.

SQL>

SQL> conn lunar/lunar

Connected.

SQL> select * from tab;

TNAME TABTYPE CLUSTERID

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

LUNARTEST TABLE

SQL>

总结:

将undo改变成手工管理的,

然后设置隐含参数 _ALLOW_RESETLOGS_CORRUPTION = TRUE 和 _corrupted_rollback_segments ,因为redo损坏的时候,undo数据也大都不一致

了。

2,open resetlogs之前,先使用recover database using backup controlfile until cancel;

如果此时又遇到600错误,就使用ADJUST_SCN事件来调整当前的SCN,如果SCN相差不多,可以通过多次重起数据库解决。如果scn相差比较多,

可以使用10015 event:

alter session set events '10015 trace name adjust_scn level 1';

如果SCN相差比较多,可以设置level 2,。。。level 10等 (level 1是每次打开时将将scn推进1百万)

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有