select * from dba_segments where owner='TEST';--header_block=10 [oracle@oel ~]$ dd of=/u01/app/oracle/oradata/orcl/test01.dbf bs=8192 conv=notrunc seek=11 <<EOF > asdfsdfadf > EOF 0+1 records in 0+1 records out 11 bytes (11 B) copied, 0.000609742 s, 18.0 kB/s [oracle@oel ~]$ SQL> alter system flush buffer_cache;
System altered.
SQL> select * from test.employees; select * from test.employees * ERROR at line 1: ORA-01578: ORACLE data block corrupted (file # 7, block # 11) ORA-01110: data file 7: '/u01/app/oracle/oradata/orcl/test01.dbf'
SQL>
[oracle@oel ~]$ dbv file=/u01/app/oracle/oradata/orcl/test01.dbf blocksize=8192
DBVERIFY: Release 11.2.0.4.0 - Production on Thu Feb 15 22:36:23 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
DBVERIFY - Verification starting : FILE = /u01/app/oracle/oradata/orcl/test01.dbf Page 11 is marked corrupt Corrupt block relative dba: 0x01c0000b (file 7, block 11) Bad header found during dbv: Data in bad block: type: 97 format: 3 rdba: 0x61666473 last change scn: 0x0000.000a6664 seq: 0x2 flg: 0x04 spare1: 0x64 spare2: 0x66 spare3: 0x0 consistency value in tail: 0x9b560602 check value in block header: 0xe6ef computed block checksum: 0x4ef4
DBVERIFY - Verification complete
Total Pages Examined : 128 Total Pages Processed (Data) : 1 Total Pages Failing (Data) : 0 Total Pages Processed (Index): 0 Total Pages Failing (Index): 0 Total Pages Processed (Other): 66 Total Pages Processed (Seg) : 0 Total Pages Failing (Seg) : 0 Total Pages Empty : 60 Total Pages Marked Corrupt : 1 Total Pages Influx : 0 Total Pages Encrypted : 0 Highest block SCN : 1153882 (0.1153882) [oracle@oel ~]$ ----------------------------------------------------
RMAN> recover corruption list;
Starting recover at 15-FEB-18 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=69 device type=DISK
channel ORA_DISK_1: restoring block(s) channel ORA_DISK_1: specifying block(s) to restore from backup set restoring blocks of datafile 00007 channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORCL/backupset/2018_02_15/o1_mf_nnndf_TAG20180215T221003_f8dlwvoo_.bkp channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2018_02_15/o1_mf_nnndf_TAG20180215T221003_f8dlwvoo_.bkp tag=TAG20180215T221003 channel ORA_DISK_1: restored block(s) from backup piece 1 channel ORA_DISK_1: block restore complete, elapsed time: 00:00:01
starting media recovery media recovery complete, elapsed time: 00:00:01
Finished recover at 15-FEB-18
RMAN> ---------------------------------------------------------- RMAN> blockrecover datafile 7 block 11;
Starting recover at 15-FEB-18 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=8 device type=DISK
channel ORA_DISK_1: restoring block(s) channel ORA_DISK_1: specifying block(s) to restore from backup set restoring blocks of datafile 00007 channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORCL/backupset/2018_02_15/o1_mf_nnndf_TAG20180215T221003_f8dlwvoo_.bkp channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2018_02_15/o1_mf_nnndf_TAG20180215T221003_f8dlwvoo_.bkp tag=TAG20180215T221003 channel ORA_DISK_1: restored block(s) from backup piece 1 channel ORA_DISK_1: block restore complete, elapsed time: 00:00:01
starting media recovery media recovery complete, elapsed time: 00:00:03
Finished recover at 15-FEB-18
RMAN> ----------------------------------------------------------------