RMAN出现文件损坏ORA-19566: exceeded limit of 0 corrupt blocks 处理

http://www.itpub.net/showthread.php?s=&threadid=727648

Primary DB:
Linux AS3.0 + Oracle 9.2.0.4 RAC



output filename=/backup/ocfs_data/intel/tools01.dbf recid=362 stamp=615574424
channel dmd2: copied datafile 7
output filename=/backup/ocfs_data/intel/users01.dbf recid=363 stamp=615574428
channel dmd2: copied datafile 8
output filename=/backup/ocfs_data/intel/xdb01.dbf recid=364 stamp=615574437
channel dmd2: copied datafile 9
output filename=/backup/ocfs_data/intel/undotbs02.dbf recid=365 stamp=615574645
released channel: dmd2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of copy command on dmd2 channel at 02/26/2007 16:56:10
ORA-19566: exceeded limit of 0 corrupt blocks for file /ocfs_data/intel/base_data01.dbf
ORA-19600: input file is datafile 10 (/ocfs_data/intel/base_data01.dbf)
ORA-19601: output file is datafile-copy 0 (/backup/ocfs_data/intel/base_data01.dbf)

RMAN>
RMAN>
RMAN>
RMAN> **end-of-file**

***
Corrupt block relative dba: 0x0280cab8 (file 10, block 51896)
Fractured block found during datafile copy
Data in bad block -
type: 0 format: 2 rdba: 0x0000cab8
last change scn: 0x0000.00000000 seq: 0x1 flg: 0x05
consistency value in tail: 0x00000000
check value in block header: 0xcdb8, computed block checksum: 0x1
spare1: 0x0, spare2: 0x0, spare3: 0x0
***

一下是回复:


应该是file 10 的块51896损坏

如果有备份的话使用blockrecover修复一下


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

Find the segment and rebuild it.

If it is an index, rebuild it directly.
If it is a table, can you query all rows from it?

查詢壞塊:

SELECT segment_name,segment_type,extent_id,block_id, blocks
from dba_extents t
where file_id = 41
AND 55692 between block_id and (block_id + blocks - 1)

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

SELECT segment_name,segment_type,extent_id,block_id, blocks
from dba_extents t
where file_id = 10
AND 51896 between block_id and (block_id + blocks - 1) ;

查了下, 还好, 是一个小表, 不知道是否能exp然后导入,还是move tablespace ? 不清楚其他的data保存到这里了是否会导致同样的问题 ??

Recovering the Data Blocks
Surprisingly, the recovery mechanism is simple and can be done online.
Shutting down the database or disconnecting the users is unnecessary.
Example 1: Recovering data blocks individually. You may want to
recover individual data blocks, if you know the file-id(s) and block-id(s).
You may get this information from the log files of the backup process,
alert.log file, v$backup_corruption, v$copy_corruption,
v$database_block_corruption views, or from users. The last one is not
aimed at though.

RMAN> BLOCKRECOVER DATAFILE 10 BLOCK 51896;

Exp and imp the table will be okay .

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

可以成功執行 select count(*) .

你可以用standby 库的相同的文件修复这个文件的这个块啊?
SORRY,看错了,还以为你是DATAGUARD,还是EXP/IMP吧.

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

既然select count(*) 能够成功
那么你试验一下create table table_bak as select * from table
能否成功
如果不行使用
ALTER SYSTEM SET EVENTS='10231 trace name context forever,level 10';
这是内部事件,设置在全表扫描时跳过损坏的数据块.
然后导出该表进行重建,在导出的过程中要注意导出的数据总数与select count(*) 是否一致,如果不一致那么说明有数据丢失,你得确认能否允许这些数据的丢失

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

可以参考一下Oracle Database 10g:Administration Workshop II SG的12章 Dealing with database corruption.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-84507/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/35489/viewspace-84507/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值