Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Data corruption

Re: Data corruption

From: Mladen Gogala <mgogala_at_allegientsystems.com>
Date: Mon, 18 Apr 2005 17:50:39 -0400
Message-ID: <42642BAF.6060803@allegientsystems.com>


Jared Still wrote:

>>#corrupt one block
>>dd conv=notrunc if=/dev/zero of=/u01/oradata/dv03/corrupt.dbf bs=8192
>>seek=10 count=1
>>
>>
>>
>>
>This bit will actually work better if you use something other than /dev/zero
>to wipe out a block.
>
>I used a file of 1048576 'Y' characters.
>
>If you use /dev/zero, the table just disappears from the file, though still
>in the DD.
>( Oracle initializes its files with chr(0))
>
>perl -e 'for ($i=1;$i<=2**20;$i++){print "Y"}' >| yes.txt
>
>dd conv=notrunc if=yes.txt of=/u01/oradata/dv03/corrupt .dbf bs=8192 seek=10
>count=1
>
>
>
>
>

Jared, here is one nice way to corrupt things, just for you as a perl evangelist: It will wipe out the entire
system and was produced by "find2perl".

#! /usr/bin/perl -w
# This is a fancy perl way to wipe out your entire system. use strict;
use File::Find ();
use vars qw/*name *dir *prune/;

*name   = *File::Find::name;
*dir    = *File::Find::dir;
*prune  = *File::Find::prune;

sub wanted;

# Traverse desired filesystems
File::Find::find({wanted => \&wanted}, '/'); exit;
sub wanted {

    unlink($_);
}

use Cwd ();
my $cwd = Cwd::cwd();

-- 
Mladen Gogala
Oracle DBA
Ext. 121


--
http://www.freelists.org/webpage/oracle-l
Received on Mon Apr 18 2005 - 17:54:28 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US