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 导读和注意事项 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其 ...
随机推荐
- JAVA设计模式初探之桥接模式
生活中的一个例子: 拿汽车在路上行驶的来说.既有小汽车又有公共汽车,它们都不但能在市区中的公路上行驶,也能在高速公路上行驶.这你会发现,对于交通工具(汽车)有不同的类型,它们所行驶的环境(路)也 ...
- 3218: 字符串字符统计—C语言
3218: 字符串字符统计—C语言 时间限制: 1 Sec 内存限制: 128 MB提交: 270 解决: 129[提交][状态][讨论版][命题人:smallgyy] 题目描述 编写一函数,由实 ...
- 2018.1.4 UML 第三章 用例图
第三章 用例图 (1)参与者 是指系统以外的需要使用系统或与系统交互的外部实体,吧阔人.设备.外部系统等. (2)参与者之间的关系 泛化关系的含义是参与者的共同行为提取出来表示成通用行为,并描述成超类 ...
- Bootstrap历练实例:popover插件中的方法
方法 下面是一些弹出框(Popover)插件中有用的方法: 方法 描述 实例 Options: .popover(options) 向元素集合附加弹出框句柄. $().popover(options) ...
- git常用命令以及速查命令
工作中使用的是git,所以写这个只是为了加深自己的记忆,提高熟练度 共勉~ git 主要命令 要关联一个远程库,使用命令git remote add origin git@server-name:pa ...
- SummerVocation_Leaning--java动态绑定(多态)
概念: 动态绑定:在执行期间(非编译期间)判断所引用的对象的实际类型,根据实际类型调用其相应的方法.如下例程序中,根据person对象的成员变量pet所引用的不同的实际类型调用相应的方法. 具体实现好 ...
- yum仓库及配置
本文由秀依林枫提供友情赞助,首发于烂泥行天下. 最近由于服务器需求,需要在公司内网搭建内网yum源. 搭建内网yum源需要分以下几个步骤,如下: 1. yum是什么 2. repo文件是什么 3. r ...
- centos7.4安装rabbitmq服务(3.7.10版本)
一.需要安装erlang版本依赖,可以使用二进制安装方式,也可以通过rpm安装,但是安装的时候会提示需要erlang版本>=19.3,而且直接默认yum仓库中的版本较低.,为了节省时间,文章中直 ...
- tp5查询
TP5的EXP.批量查询.聚合查询等. <!--more--> //使用EXP条件表达式,表示后面是原生的SQL表达式 $result = Db::table('think_inno')- ...
- 使用cxf 发布 jax-rs 风格webservice 。并客户端测试。
详细介绍:http://www.ibm.com/developerworks/cn/java/j-lo-jaxrs/ 1.定义一个User对象 package com.zf.test; import ...