阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Oracle 宕机后文件损坏resetlogs后处理

238次阅读
没有评论

共计 3695 个字符,预计需要花费 10 分钟才能阅读完成。

Oracle 数据库意外宕机,归档开了,但是归档文件损坏,redo 损坏,在强行拉起来之后 UNDO 报错,设置_corrupted_rollback_segments 跳过不一致的UNDO,重建 UNDO 表空间,接着报错:SMON encountered 100 out of maximum 100 non-fatal internal errors. 然后数据库自动宕机,报错处理如下:
1ORA-00600: internal error code, arguments: [13013], [5001], [458], [4197442], [6], [4197442], [3], [], [], [], [], []

Arg [a] Passcount 错误代码 5001
Arg [b] Data Object number 即 object_id=458
Arg [c] Tablespace Relative DBA of block containing the row to be updated
Arg [d] Row Slot number
Arg [e] Relative DBA of block being updated (should be same as [c])
Arg [f] Code 3 update~~

select object_name,owner,object_type from dba_objects where object_id=458
analyze table mon_mods$ validate structure cascade;
ALTER INDEX I_MON_MODS$_OBJ REBUILD;
create table mod_mods_bak as select * from mon_mods$;
truncate table mon_mods$;
INSERT INTO MON_MODS$ SELECT * fROM MON_MODS_BAK;
select count(*) from mon_mods$;

2 ORA-00600: internal error code, arguments: [ktspfupdst-1], [], [], [], [], [], [], [], [], [], [], []
OBJD=267 smon_scn_time 报错

dbkedDefDump(): Starting incident default dumps (flags=0x2, level=3, mask=0x0)
—– Current SQL Statement for this session (sql_id=9wncfacx0nj9h) —–
insert into smon_scn_time (thread, time_mp, time_dp, scn, scn_wrp, scn_bas, num_mappings, tim_scn_map) values (0, :1, :2, :3, :4, :5, :6, :7)
Corrupt Block Found
TSN = 1, TSNAME = SYSAUX
RFN = 2, BLK = 133475, RDBA = 8522083
OBJN = 269, OBJD = 267, OBJECT = , SUBOBJECT =
SEGMENT OWNER = , SEGMENT TYPE =

select object_name,owner,object_type from dba_objects where object_id=267;
analyze table SMON_SCN_TIME validate structure cascade;

果断报错

select dbms_metadata.get_ddl(‘CLUSTER’,’SMON_SCN_TO_TIME_AUX’,’SYS’) from dual;
  CREATE CLUSTER “SYS”.”SMON_SCN_TO_TIME_AUX”  (
        “THREAD” NUMBER )
  PCTFREE 10 PCTUSED 40 INITRANS 2 MAXTRANS 255
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE “SYSAUX”
  PARALLEL (DEGREE 1 INSTANCES 1)
 select dbms_metadata.get_ddl(‘TABLE’,’SMON_SCN_TIME’,’SYS’) from dual;create cluster smon_scn_to_time (
  thread number                        /* thread, compatibility */
)
/
create index smon_scn_to_time_idx on cluster smon_scn_to_time
/
create table smon_scn_time (
  thread number,                        /* thread, compatibility */
  time_mp number,                        /* time this recent scn represents */
  time_dp date,                          /* time as date, compatibility */
  scn_wrp number,                        /* scn.wrp, compatibility */
  scn_bas number,                        /* scn.bas, compatibility */
  num_mappings number,
  tim_scn_map raw(1200),
  scn number default 0,                  /* scn */
  orig_thread number default 0          /* for downgrade */
) cluster smon_scn_to_time (thread)
/
create unique index smon_scn_time_tim_idx on smon_scn_time(time_mp)
/
create unique index smon_scn_time_scn_idx on smon_scn_time(scn)
/SQL> analyze table SMON_SCN_TIME validate structure;
SQL> analyze table SMON_SCN_TIME validate structure cascade;

要么禁用 smon_scn_time 刷新:
alter system set events ‘12500 trace name context forever, level 10’;
副作用就是会导致 flashback 会报错;

3 ORA-00600: internal error code, arguments: [kkpolpd7], [1403], [], [], [], [], [
], [], [], [], [], []

ORA-00600: internal error code, arguments: [kewrose_1], [600]由这个错误产生与 mmon 进程有关,非关键进程,可以杀掉重启,

Oracle 宕机后文件损坏 resetlogs 后处理

4 ora-00600 [6002],[a],[b],[c]

MOS:ORA-600 [6002] “Index block check” (Doc ID 47449.1)
DESCRIPTION:
Oracle was trying to insert a key and key data into a b*tree index.
In order to do this, it had to first find the correct leaf block to do the insert.
Once the correct leaf block is retrieved, Oracle validates the block
by checking the data size and number of columns in the key.
If there is a mismatch then ORA-600 [6002] is reported.

ARGUMENTS:
Arg [a] Number of bytes in keydata
Arg [b] Number of bytes in the index layer of the leaf header
Arg [c] Number of columns in index search key structure
Arg [d] Number of columns in the index layer fo the leaf header

FUNCTIONALITY:
Kernel Data layer Index
索引问题,找到对应索引,重建,再验证表结构:ANALYZE TABLE xxxxx VALIDATE STRUCTURE CASCADE;
5 ora-00600 [25027] [7] [a] [b]
arg[a] Tablespace Number 表空间号
arg[b] 十进制的相对数据块号 Relative Data Block Address (RDBA)
表或者索引有问题,重建对应的表或者索引;

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-22发表,共计3695字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中