根据rowid查找数据文件号,数据块号 恢复

select file#||chr(9)||name||chr(9)||bytes from v$datafile;

declare
ridtyp number;
objnum number;
relfno number;
blno number;
rowno number;
rid rowid;
begin
select rowid into rid from test where id=30;
dbms_rowid.rowid_info(rid, ridtyp,objnum,relfno,blno,rowno );
dbms_output.put_line('Row Type:' || to_char(ridtyp));
dbms_output.put_line('objnum:' || to_char(objnum));
dbms_output.put_line('relfno:' || to_char(relfno));
dbms_output.put_line('blno:' || to_char(blno));
dbms_output.put_line('rowno :' || to_char(rowno ));
end;
/

bbed.par
blocksize = 8192
listfile=list
mode=edit

bbed parfile=bbed.par
set dba 1,3243
find /c zhang
dump /v dba 1,3243 offset 8183 count 32
modify 100 dba 1,3243
exit


dbv file=/backup/test/test/system01.dbf


rman target /
backup check logical validate database;

select file#,block#,blocks from v$database_block_corruption;

select * from test;

rman target /
blockrecover datafile 1 block 3243;

 

上一篇:使用存储过程 先修改要查询的语句在查询


下一篇:MySQL实战45讲学习笔记----随机消息