Corrupt block relative dba: 0x04c20df1
alert日志报以下提示:
Corrupt block relative dba: 0x04c20df1 (file 19, block 134641)
Fractured block found during backing up datafile
Data in bad block:
type: 40 format: 2 rdba: 0x04c20df1
last change scn: 0x0000.189926c6 seq: 0x2 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x26c52802
check value in block header: 0xd25a
computed block checksum: 0x28b1
Reread of blocknum=134641, file=/oradata/omsdb1/OMS_DATA12.dbf. found same corrupt data
Reread of blocknum=134641, file=/oradata/omsdb1/OMS_DATA12.dbf. found same corrupt data
Reread of blocknum=134641, file=/oradata/omsdb1/OMS_DATA12.dbf. found same corrupt data
Reread of blocknum=134641, file=/oradata/omsdb1/OMS_DATA12.dbf. found same corrupt data
Reread of blocknum=134641, file=/oradata/omsdb1/OMS_DATA12.dbf. found same corrupt data
根据上述信息得知19号数据文件的134641为坏块,可以使用DBV工具或者RMAN来检查坏块信息
dbv:
[oracle@ASZAAS-OMS01 ~]$ dbv file=/oradata/omsdb1/OMS_DATA12.dbf DBVERIFY: Release 11.2.0.4.0 - Production on Fri Jun 29 10:57:30 2018 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. DBVERIFY - Verification starting : FILE = /oradata/omsdb1/OMS_DATA12.dbf
Page 134641 is influx - most likely media corrupt
Corrupt block relative dba: 0x04c20df1 (file 19, block 134641)
Fractured block found during dbv:
Data in bad block:
type: 40 format: 2 rdba: 0x04c20df1
last change scn: 0x0000.189926c6 seq: 0x2 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x26c52802
check value in block header: 0xd25a
computed block checksum: 0x28b1 DBVERIFY - Verification complete Total Pages Examined : 3932160
Total Pages Processed (Data) : 164199
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 9003
Total Pages Failing (Index): 0
Total Pages Processed (Other): 3757308
Total Pages Processed (Seg) : 0
Total Pages Failing (Seg) : 0
Total Pages Empty : 1649
Total Pages Marked Corrupt : 1
Total Pages Influx : 1
Total Pages Encrypted : 0
Highest block SCN : 421782991 (0.421782991)
rman:
RMAN> backup validate datafile 19; Starting backup at 29-JUN-18
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00019 name=/oradata/omsdb1/OMS_DATA12.dbf
channel ORA_DISK_1: backup set complete, elapsed time: 00:08:16
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
19 FAILED 0 1649 3932160 421804976
File Name: /oradata/omsdb1/OMS_DATA12.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 164199
Index 0 9001
Other 1 3757311 validate found one or more corrupt blocks
See trace file /u01/app/oracle/diag/rdbms/omsdb1/omsdb1/trace/omsdb1_ora_20078.trc for details
Finished backup at 29-JUN-18
可以根据文件号和块号查出损坏的是对象,表还是LOB segment
select tablespace_name,segment_type,owner,segment_name from dba_extents where file_id=19 and 134641 between block_id AND block_id + blocks - 1;
19是文件号,134641是block号
如果是对象,可以重建:
alter index indexname rebuild
如果是表,可以使用10231事件忽略坏块,然后使用CTAS方式重建表最后rename table,别忘记rebuild index
alter session SET EVENTS '10231 trace name context forever,level 10';
create table tab_new as select * from tab;
rename tab to tab_bak;
rename tab_new to new;
alter index indexname rebuild;
alter session SET EVENTS '10231 trace name context off';
如果损坏的是LOB segment,先找出segment信息:
select owner, segment_name, segment_type from dba_extents where file_id = 19 and 134641 between block_id and block_id + blocks - 1;
输出如下:
owner=OMSADMIN
segment_name=SYS_LOB0000087489C00007$$
segment_type=LOBSEGMENT
找到表名和LOB字段:
select table_name, column_name from dba_lobs where segment_name = 'SYS_LOB0000087489C00007$$' and owner = 'OMSADMIN';
输出如下:
table_name = OMS_LOGINFOR
column_name = CONTENT
找到坏块的bad rowid,使用以下plsql脚本:
create table bad_rows (row_id ROWID,oracle_error_code number); declare
n number;
error_code number;
bad_rows number := 0;
ora1578 EXCEPTION;
PRAGMA EXCEPTION_INIT(ora1578, -1578);
begin
for cursor_lob in (select rowid rid, &lob_column from &table_owner.&table_with_lob) loop
begin
n:=dbms_lob.instr(cursor_lob.&lob_column,hextoraw('')) ;
exception
when ora1578 then
bad_rows := bad_rows + 1;
insert into bad_rows values(cursor_lob.rid,1578);
commit;
when others then
error_code:=SQLCODE;
bad_rows := bad_rows + 1;
insert into bad_rows values(cursor_lob.rid,error_code);
commit;
end;
end loop;
dbms_output.put_line('Total Rows identified with errors in LOB column: '||bad_rows);
end;
/
Enter value for lob_column: CONTENT
Enter value for table_owner: OMSADMIN
Enter value for table_with_lob: OMS_LOGINFOR
可以查询bad rowid
select * from bad_rows;
ROW_ID ORACLE_ERROR_CODE
1 AABIz+AATAAAf2jAAB 1578
2 AABIz+AATAAAf2zAAA -1555
3 AABIz+AATAAAf2zAAB -1555
4 AABIz+AATAAAf7kAAA -1555
更新空LOB字段来避免ORA-1578,ORA-26040,如果是CLOB类型,将empty_blob()改为empty_clob()
update &table_owner.&table_with_lob set &lob_column = empty_clob() where rowid in (select row_id from bad_rows);
将bad rowid lob块移到其他表空间:
alter table &table_owner.&table_with_lob move LOB (&lob_column) store as (tablespace &tablespace_name);
最后重建索引rebuild index
Corrupt block relative dba: 0x04c20df1的更多相关文章
- Oracle corrupt block(坏块) 详解
转自:http://blog.csdn.net/tianlesoftware/article/details/5024966 一. 坏块说明 1.1 相关链接 在看坏块之前,先看几个相关的链接,在后面 ...
- ImageConverter引起的 invalid address or address of corrupt block 0xb7feab58 passed to dlfree
虹软人脸识别,其方法要传NV21格式的byte[], github上有一个虹软的Demo,是不是虹软工作人员写的不清楚,这个Demo里bitmap转NV21格式byte[]用的是一个第三方库https ...
- 关于Oracle备份中的fractured block
One danger in making online backups is the possibility of inconsistent data within a block. For exam ...
- ORA-19566: exceeded limit of 0 corrupt blocks for file E:\xxxx\<datafilename>.ORA.
How to Format Corrupted Block Not Part of Any Segment (Doc ID 336133.1) To BottomTo Bottom In this D ...
- ORA-00600 3020 ORA-10567案例
PlateSpin克隆复制出的Oracle数据库服务器,往往启动数据库实例都会遇到一些杂七杂八的问题.今天测试DR环境时又遇到了一个特殊场景,在此之前,我已经遇到了下面两起案例: ORA-00600: ...
- 使用BBED模拟Oracle数据库坏块
BBED(OracleBlockBrowerandEDitor Tool),用来直接查看和修改数据文件数据的一个工具,是Oracle一款内部工具,可以直接修改Oracle数据文件块的内容,在一些极端恢 ...
- dbms_file_transfer使用简介
dbms_file_transfer这个包可以在两个位置传输文件,分别可以有以下位置: a 从一个asm diskgroup传输到另外一个asm diskgroup b 从一个asm diskgrou ...
- Oracle数据块损坏的恢复实例
测试环境:11.2.0.4 1.构建数据块损坏的测试环境 2.有备份:常规恢复坏块 3.无备份:跳过坏块 1.构建数据块损坏的测试环境 1.1 创建测试表 --Create Table t_test ...
- 【BBED】BBED模拟并修复ORA-08102错误
[BBED]BBED模拟并修复ORA-08102错误 1.1 BLOG文档结构图 1.2 前言部分 1.2.1 导读和注意事项 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其 ...
随机推荐
- Mac终端下使用***
首先安装proxychains: brew install proxychains-ng 然后创建文件~/.proxychains/proxychains.conf,写入以下内容: strict_ch ...
- ubuntu or centos 网卡无法启动
[root@seasoned-bro:/home/daeh0f]# /etc/init.d/network restart Restarting network (via systemctl): Jo ...
- React后台管理系统-rich-editor组件
1.Simditor组件的github地址:https://github.com/mycolorway/simditor 网址:http://simditor.tower.im/ 2.在util里边新 ...
- 前端小记6——项目中常用的ES6方法
现在很多功能用es5的方法也能实现功能,但es6提供的方法显得更为高效.记录下目前常用的几个方法. 1.字符包含 通过str.includes('a')来判断, 若str中包含a则结果为true,否则 ...
- 循环引用问题 -- dealloc方法不执行
dealloc不执行 如果一个类在释放过后,dealloc方法没有执行,那么就代表着这个类还被其他对象所引用,引用计数不为0,这样就造成了内存泄露 昨天其他业务线开发告知他所依赖的我这边的父类VC的- ...
- API调用微信getWXACodeUnlimit()获取小程序码
微信文档地址:https://developers.weixin.qq.com/miniprogram/dev/api/open-api/qr-code/getWXACodeUnlimit.html? ...
- 【转】C++ 标准库值操作迭代器的常见函数
迭代器是C++标准库中的重要组件,特别是在容器内部,没有迭代器,容器也就无所谓存在了. 例如:vector容器简而言之就是3个迭代器 start finish 以及end_of_storage vec ...
- ElasticSearch High Level REST API【4】多搜索
1.Multi-Search多搜索请求 Multi-Search可同时添加多个search搜索请求,并行地在一个http请求中执行多个搜索请求,相较多次单请求查询可提升查询效率.ES客户掉通过mget ...
- 六、Linux 文件基本属性
Linux 文件基本属性 Linux系统是一种典型的多用户系统,不同的用户处于不同的地位,拥有不同的权限.为了保护系统的安全性,Linux系统对不同的用户访问同一文件(包括目录文件)的权限做了不同的规 ...
- 八、MySQL 数据类型
MySQL 数据类型 MySQL中定义数据字段的类型对你数据库的优化是非常重要的. MySQL支持多种类型,大致可以分为三类:数值.日期/时间和字符串(字符)类型. 数值类型 MySQL支持所有标准S ...