Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to simulate a disk failure
>>>( or any other OS as far as I know) will not you delete a file that is in
use
on any other OS I would say : cat /dev/null > system.dbf does some cool
things
or dd if=/dev/null of=system.dbf bs=1024 count=1000 is also nice for some
excellent fireworks !
Having said that - there is another way to simulate disk failures or
datafile/controlfile/redolog corruption.
First of all - this info can be found by anyone owning an Oracle box.
Secondly - do not do this on a production system (not even to make fun of
the jr DBA)
Thirdly - if by any chance you lose data by setting the following parameters
it's your fault not mine ...
So here goes - there are a number of events you can set (either by setting
them in init.ora or by using oradebug)
to *simulate* failures :
10059, "simulate error in logfile create/clear"
10209, "enable simulated error on controlfile"
/ Enables event 10214 to signal an error for a specific file. Level / is the number of the file to enable them for (file number order from / INIT.ORA file). A level greater than the maximum controlfile multiplexing / factor will signal error for all files.
10213, "crash after controlfile write"
10214, "simulate write errors on controlfile" / A level of 1-9 simulates write errors on physical blocks 1-9. / If level >= 10 every controlfile write will force an error.
10215, "simulate read errors on controlfile"
/ For errors 10213,10214, and 10215 / level 1 is for header / level 2 is for shared info / level >2 is any other block / No error 10214 will be simulated unless event 10209 is also set to enable / error simulation on that file
10229, "simulate I/O error against datafiles"
10252, "simulate write error to data file header"
10253, "simulate write error to redo log"
10285, "Simulate controlfile header corruption" // *Action: If set, will cause controlfile header verification to fail
10286, "Simulate controlfile open error" // *Action: If set, will cause the next controlfile open to have an error
10287, "Simulate archiver error"
// *Action: If set, next archive log will generate error
Kind Regards
Koert
"TurkBear" <jgreco1_at_mn.rr.com> wrote in message
news:4uj06ucuv9fvo04tpuj9n7h8mvjptqtls5_at_4ax.com...
> To answer you specific question, you can't delete them because Oracle is
using them and
> NT ( or any other OS as far as I know) will not you delete a file that is
in use...
>
>
> Connor McDonald <connor_mcdonald_at_yahoo.com> wrote:
>
> >Leigh Gold wrote:
> >>
> >> We have a test machine which we use to test our backup and recovery
> >> procedure.
> >>
> >> I was trying to simulate a disk failure by deleting datafiles from a
> >> particular disk drive (D) but kept getting 'sharing violation' error.
Oracle
> >> is running at that time and not other users are on. Any idea why I
couldn't
> >> delete those files?
> >>
> >> It is Win NT 4.0 with oracle 8.1.6.
> >>
> >> Thanks,
> >>
> >> Leigh
> >
> >'ocopy' is designed for backing up datafile whilst they are still open,
> >ie, 'ocopy datafile-name backup-location'. I haven't tried, but maybe
> >you could try 'ocopy piece-of-junk datafile-name'
> >
> >hth
> >connor
>
>
>
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> Check out our new Unlimited Server. No Download or Time Limits!
> -----== Over 80,000 Newsgroups - 19 Different Servers! ==-----
Received on Tue Feb 05 2002 - 16:42:49 CST
![]() |
![]() |