|  | 
 
| 
sys@OMREP> select * from srain;
x
马上注册,结交更多好友,享用更多功能^_^您需要 登录 才可以下载或查看,没有账号?立即注册  
 
 JOB
 ----------------------------------------------------------------------------------------------------
 srain is dba!
 srain like oracle!
 
 sys@OMREP> select rowid,
 2          dbms_rowid.rowid_relative_fno(rowid)rel_fno,
 3          dbms_rowid.rowid_block_number(rowid)blockno,
 4          dbms_rowid.rowid_row_number(rowid) rowno
 5  from srain;
 
 ROWID                 REL_FNO    BLOCKNO      ROWNO
 ------------------ ---------- ---------- ----------
 AAADcJAAEAAAAFrAAA          4        363          0
 AAADcJAAEAAAAFrAAB          4        363          1
 
 [oracle@localhost ~]$ bbed parfile=bbed.par
 Password:
 
 BBED> set dba 4,363 offset 0
 DBA             0x0100016b (16777579 4,363)
 OFFSET          0
 
 BBED> d /v count 64
 File: /u01/app/oracle/oradata/omrep/users01.dbf (4)
 Block: 363     Offsets:    0 to   63  Dba:0x0100016b
 -------------------------------------------------------
 06a20000 6b010001 75801600 00000104 l .¢..k...u.......
 5aad0000 01000000 09370000 75801600 l Z-.......7..u...
 00000000 03003200 68010001 0a000e00 l ......2.h.......
 85020000 00000000 00000000 00800000 l ................
 
 <16 bytes per line>
 
 BBED> modify /x 12345678
 File: /u01/app/oracle/oradata/omrep/users01.dbf (4)
 Block: 363              Offsets:    0 to   63           Dba:0x0100016b
 ------------------------------------------------------------------------
 12345678 6b010001 75801600 00000104 5aad0000 01000000 09370000 75801600
 00000000 03003200 68010001 0a000e00 85020000 00000000 00000000 00800000
 
 <32 bytes per line>
 
 BBED> sum apply
 Check value for File 4, Block 363:
 current = 0x4318, required = 0x4318
 
 sys@OMREP> alter system flush buffer_cache;
 
 System altered.
 
 sys@OMREP> select * from srain;
 select * from srain
 *
 ERROR at line 1:
 ORA-01578: ORACLE data block corrupted (file # 4, block # 363)
 ORA-01110: data file 4: '/u01/app/oracle/oradata/omrep/users01.dbf'
 
 sys@OMREP> select * from v$database_block_corruption;
 
 FILE#     BLOCK#     BLOCKS CORRUPTION_CHANGE# CORRUPTIO
 ---------- ---------- ---------- ------------------ ---------
 4        363          1                  0 CORRUPT
 
 (4)CORRUPT: Block is wrongly identified or is not a data block (for example,the data block address is missing)
 
 **********************************************************************************************************************
 
 BBED> revert
 All changes made in this session will be rolled back. Proceed? (Y/N) y
 Reverted file '/u01/app/oracle/oradata/omrep/users01.dbf', block 363
 Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
 
 sys@OMREP> alter system flush buffer_cache;
 
 System altered.
 
 sys@OMREP> select * from srain;
 
 JOB
 ----------------------------------------------------------------------------------------------------
 srain is dba!
 srain like oracle!
 
 sys@OMREP> select * from v$database_block_corruption;
 
 FILE#     BLOCK#     BLOCKS CORRUPTION_CHANGE# CORRUPTIO
 ---------- ---------- ---------- ------------------ ---------
 4        363          1                  0 CORRUPT
 
 RMAN> backup validate datafile 4;
 
 Starting backup at 08-SEP-13
 using target database control file instead of recovery catalog
 allocated channel: ORA_DISK_1
 channel ORA_DISK_1: SID=48 device type=DISK
 channel ORA_DISK_1: starting full datafile backup set
 channel ORA_DISK_1: specifying datafile(s) in backup set
 input datafile file number=00004 name=/u01/app/oracle/oradata/omrep/users01.dbf
 channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
 List of Datafiles
 =================
 File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
 ---- ------ -------------- ------------ --------------- ----------
 4    OK     0              1353         22560           1474677
 File Name: /u01/app/oracle/oradata/omrep/users01.dbf
 Block Type Blocks Failing Blocks Processed
 ---------- -------------- ----------------
 Data       0              20642
 Index      0              50
 Other      0              515
 
 Finished backup at 08-SEP-13
 
 sys@OMREP> select * from v$database_block_corruption;
 
 no rows selected
 
 
 | 
 |