[comp.databases] Help my oracle db is down ......

tsmackinnon@brb.isnet.inmos.co.uk (11/23/90)

In article <1990Nov19.061144.12401@brolga.cc.uq.oz.au>, exnirad@brolga.cc.uq.oz.au (Nirad Sharma) writes:
> Panic. Panic. My oracle V5 db (SCO Xenix 2.3.2) went down and won't come back.
> Before the inevitable questions of backups, I was backing up daily until 
> about a month ago when I had to disable the automatic backups due to a timer
> problem. I have been unable to back up since due to SEVERE time shortages.
> Given that this has occurred, here is what happened and what I have done (to
> possibly mess it up more.)
> 
> 
> 	Instead, I'm horrified to get the following message :
> 	"IOR:  ORA-0422:  cannot recover; before image range not open"
> 
> Is there any way of recovering this db ? What steps do I take, if any ?
> If it is beyond my command, can oracle support restore a image copy of
> a database ? (I'm pretty sure that the actual dbs file is not corrupt.)
> 

I know we've been there ourselves !

ORACLE can supplied us with a very small bit of fortran code that writes 0's
over certain blocks in the database file header :


----cut here--------------------------------------------------

      PROGRAM ZAP

      INTEGER*4 IBLOCK(512)

      OPEN(UNIT=1,NAME='ORACLE$DBS',TYPE='OLD',FORM='UNFORMATTED',
     +     ACCESS='DIRECT',BLOCKSIZE=2048)

      READ(UNIT=1,REC=1) IBLOCK
      DO I =20,512
            IBLOCK(I) = 0
      ENDDO
      WRITE(1,REC=1) IBLOCK
      READ (UNIT=1,REC=2) IBLOCK
      DO I =16,512
            IBLOCK(I) = 0
      ENDDO
      WRITE(1,REC=2) IBLOCK
      CLOSE(UNIT=1)
      STOP
      END

----cut here--------------------------------------------------


Once this patch has been run, CCF yourself a new BI file and start the database
up. Close it down again immediately and do a full export/import.

If you then do a normal warm startup everything should be ok.

We were running at V5.1.22


I would still strongly advise that you speak to ORACLE about this patch before
running it. The guy we got it from was Bob Dunsby at the UK ORACLE response
centre (UK - 0344 860066), he is a good guy and knows VMS well.

Good luck

Jon Mackinnon

Systems Mgr
INMOS
Newport
S.Wales
UK
(0633-810121)