Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Simulating data block corruption

646508Jan 12 2010 — edited Jan 27 2010
Hi

DB 10.2.0.1.0
OS OEL4


I want to simulate data block corruption this is what i have done.
set heading off
set lines 113
SELECT 'dd of=' || f.file_name || ' bs=8192 conv=notrunc seek=' ||
       to_number(S.HEADER_BLOCK + 1) || ' << EOF',
       'CORRUPT corrupt CORRUPT corrupt CORRUPT corrupt CORRUPT corrupt CORRUPT CORRUPT CORRUPT CORRUPT corrupt corrupt ',
       'EOF'
  FROM DBA_SEGMENTS S, dba_data_files f, dba_tables t
 WHERE f.tablespace_name = t.tablespace_name
   and S.SEGMENT_NAME = t.table_name
   and t.table_name = 'ANK'
   and S.OWNER = t.owner
   and t.owner = 'TEST';
after executing it i did

alter system flush buffer_cache;

select * from ank; //logged in as test user(owner of this table)

but still i am able to see the contents of table??

is there any way to simulate corruption


Khurana
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 24 2010
Added on Jan 12 2010
8 comments
3,278 views