Re: HELP requested: database restore problem

From: Lee Parsons <lparsons_at_exlog.com>
Date: Fri, 7 Jan 94 00:25:18 GMT
Message-ID: <1994Jan7.002518.14459_at_exlog.com>


In article <2gfho1$k3l_at_news.u.washington.edu> philt_at_u.washington.edu () writes:
>
> We run Oracle6 on Ultrix 4.2. For an unknown reason today, well,
>it's my stupidity, I was playing around with "create database".
>What I did was just the following and it caused me a BIG trouble, I mean,
>HUGE. !_at_#$%^
>
> 1. SQLDBA> shutdown
> 2. SQLDBA> startup nomountt
> 3. SQLDBA> connect internal
> 4. SQLDBA> create database oracle controlfile reuse
>
> I checked the files under /usr/oracle/dbs/*.*, there are
>two database files dbsoracle.dbf (old/original one)
>and dbs1oracle.dbf (newly created one). My problem is:
>
> How can I restore the database to its original state, that means
>before the "create database" i just did today?

If the only thing that was zapped here was the control file (I think that this is the case looking at the information provided but you should confirm before you get your hopes up.) the the following should work for you.

Under sqldba:

shutdown
startup nomount
connect internal

create controlfile DATABASE foo

	DATAFILE '/disk/system.dbf' size 5M,           
	         '/disk/rollback.dbf' size 5M,
	         '/disk/temp.dbf' size 5M,
	         '/disk/user.dbf' size 5M
        LOGFILE  '/disk/log1.dbf' size 500k,
                 '/disk/log2.dbf' size 500k,
                 '/disk/log3.dbf' size 500k
        NORESETLOGS;

alter database mount;
alter database open NORESETLOGS;

Of course the DATAFILES/LOGFILES and foo business should be changed to describe your database but given a test database I have here this recreated a deleted control file.

Make sure you put in ALL the datafile you want the database to know about or you will not be able to access them later.

I'm not sure what will happen if your logfiles where zaped. You still MAY get this to work if you change to NORESETLOGS to RESETLOGS.

-- 
Regards, 

Lee E. Parsons                  		Baker Hughes Inteq, Inc
Oracle Database Administrator 			lparsons_at_exlog.com 
Received on Fri Jan 07 1994 - 01:25:18 CET

Original text of this message