环境模拟

因为手头没有19.3的环境,用了一个centos 7.9下的18.3的cdb环境,开启归档

pdb创建表,模拟构造数据

然后删除redo log模拟损坏

模拟插入过程,及错误时的报错

SQL> create table t(x int);

Table created.

SQL> begin

for i in 1..1000000 loop

insert into t values(i);

commit;

end loop;

end;  2    3    4    5    6 

  7  /

^Cbegin

*

ERROR at line 1:

ORA-12152: TNS:unable to send break message

大致流程

  1. 配置参数事件启动
  2. Alter database open [resetlogs];+alter database recover usning bakcup controlfle;
  3. Undo使用manual
  4. 处理undo空间
  5. 其他强起的伴生问题处理

针对性错误

ORA-00313

SQL> startup

ORACLE instance started.

Total System Global Area 1593835440 bytes

Fixed Size                  8896432 bytes

Variable Size             956301312 bytes

Database Buffers          620756992 bytes

Redo Buffers                7880704 bytes

Database mounted.

ORA-00313: open failed for members of log group 2 of thread 1

ORA-00312: online log 2 thread 1: ‘/opt/oracle/oradata/ORCLCDB/redo02.log

ORA-27037: unable to obtain file status

Linuxx86_64 Error: 2: No such file or directory

Additional information: 7

解决办法

*._allow_resetlogs_corruption=true

create pfile from spfile;

vi /opt/oracle/product/18c/dbhome_1/dbs/initORCLCDB.ora

*._allow_resetlogs_corruption=true

startup mount pfile=’/opt/oracle/product/18c/dbhome_1/dbs/initORCLCDB.ora

ORA-00600: [kcbzib_kcrsds_1]

SQL> alter database open resetlogs;

alter database open resetlogs

*

ERROR at line 1:

ORA-00603: ORACLE server session terminated by fatal error

ORA-01092: ORACLE instance terminated. Disconnection forced

ORA-00704: bootstrap process failure

ORA-00704: bootstrap process failure

ORA-00600: internal error code, arguments: [kcbzib_kcrsds_1], [], [], [], [],

[], [], [], [], [], [], []

Process ID: 5529

Session ID: 237 Serial number: 37189

解决办法  

’ *.event=’21307096 trace name context forever, level 3′

vi /opt/oracle/product/18c/dbhome_1/dbs/initORCLCDB.ora

*._allow_resetlogs_corruption=true

*.event=’21307096 trace name context forever, level 3′

ORA-00600: [4194]

【4193】【4194】【4197】都是同类undo问题

SQL> alter database open ;

alter database open

*

ERROR at line 1:

ORA-00603: ORACLE server session terminated by fatal error

ORA-01092: ORACLE instance terminated. Disconnection forced

ORA-00600: internal error code, arguments: [4194], [13], [16], [], [], [], [],

[], [], [], [], []

Process ID: 6121

Session ID: 237 Serial number: 52596

解决办法

*.undo_management=manual

vi /opt/oracle/product/18c/dbhome_1/dbs/initORCLCDB.ora

*._allow_resetlogs_corruption=true

*.event=’21307096 trace name context forever, level 3′

*.undo_management=manual

后续收尾

重建undotbs

SQL> startup mount pfile=’/opt/oracle/product/18c/dbhome_1/dbs/initORCLCDB.ora’;

ORACLE instance started.

Total System Global Area 1593835440 bytes

Fixed Size                  8896432 bytes

Variable Size             956301312 bytes

Database Buffers          620756992 bytes

Redo Buffers                7880704 bytes

Database mounted.

SQL> alter database open;

SQL> show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

———- —————————— ———- ———-

         2 PDB$SEED                       READ ONLY  NO

         3 ORCLPDB1                       MOUNTED

         4 TEST                           MOUNTED

Database altered.

SQL> alter pluggable database test open;

Pluggable database altered.

SQL> alter session set container=test;

Session altered.

SQL> select * from t;

select * from t

              *

ERROR at line 1:

ORA-00942: table or view does not exist

表t完全丢失

检查undo段情况,这次模拟运气不好,没有损坏的undo段,这种时候直接替换undotbs就可以

SQL> select SEGMENT_ID,SEGMENT_NAME,STATUS,TABLESPACE_NAME from dba_rollback_segs where status not in(‘ONLINE’,’OFFLINE’);

no rows selected

SQL>

SQL>

SQL> select KTUXEUSN,KTUXESLT,KTUXESTA,KTUXECFL,KTUXESIZ from x$ktuxe where KTUXESTA=’ACTIVE’ and KTUXECFL=’DEAD’;

no rows selected

SQL> drop tablespace UNDOTBS1;

Tablespace dropped.

SQL> create undo tablespace UNDOTBS1 datafile ‘/opt/oracle/oradata/ORCLCDB/undotbs1.dbf’ size 1g autoextend on;

Tablespace created.

如果有undo段损坏,使用参数

*._corrupted_rollback_segments=(_SYSSMU4_xxxxxxx$)

重启然后舍弃undotbs1,再重建

伴生的错误ORA-00600:[kdsgrp1]

Alert日志中,关闭sqlplus时会出现

ORA-00600: internal error code, arguments: [kdsgrp1], [], [], [], [], [], [], [], [], [], [], []

ORA-06512: at “SYS.DBMS_SPD_INTERNAL”, line 134

ORA-06512: at “SYS.DBMS_SPD”, line 257

ORA-06512: at “SYS.DBMS_SPD”, line 333

ORA-06512: at line 1

排查完是sys.COL_USAGE$有损坏。影响不大。正常流程这个应该是将强起的库导出再重建。毕竟内置的很多表损坏不可知。

总结

流程上11g的强起区别不大,ora600[2662]、[2663]变成[kcbzib_kcrsds_1],本质还是一致性问题,还是需要推scn

核心事件

event=21307096 这个事件包含整个12c的生命周期了。从12.1-19都能用。

参考

Force Open Database after applying Patch 21307096 (Doc ID 2674196.1)

Step by step to resolve ORA-600 4194 4193 4197 on database crash (Doc ID 1428786.1)

原文地址:https://blog.csdn.net/q195136130/article/details/134630808

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任

如若转载,请注明出处:http://www.7code.cn/show_16703.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注