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

Home -> Community -> Usenet -> c.d.o.server -> Re: Recover a DB from a hot backup.

Re: Recover a DB from a hot backup.

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Tue, 16 Apr 2002 23:05:00 +0200
Message-ID: <ubp4ta6pf9om2a@corp.supernews.com>

"François Bourdages" <francois.bourdages_at_mobilair.qc.ca> wrote in message news:aadece84.0204160554.43079a3d_at_posting.google.com...
> Hi
> (OS : Windows NT - Database standard 8.0.4)
>
> Here is what I do for my hot backup :
> -----------------------------------
> 0) delete of all the backup file in the "bkp_directory"
> 1) Rename of the archive file (*.arc) to *.old
> 2) Copy of the init*.ora file to the "bkp_directory"
> 3) Alter system switch logfile;
> 4) Hot backup of all the datafiles with :
> alter tablespace SYSTEM begin backup;
> host start /wait c:\orant\bin\ocopy80.exe "datafile2backup"
> "bkp_directory"
> alter tablespace SYSTEM end backup;
> ... (for all the datafiles and tablesspaces)
> 5) Alter system switch logfile; (again)
> 6) Backup of all the controlfiles with :
> Alter database backup controlfile to 'bkp_dir\CTL1xxx.ORA' REUSE;
> Alter database backup controlfile to 'bkp_dir\CTL2xxx.ORA' REUSE;
> Alter database backup controlfile to trace
> 7) Copy of all the new archive file (*.arc) to the "bkp_directory"
> End.
>
> Eventually , i delete the old archive file.
> --> My Probleme is when i restore every thing on another server with
> the same database in it.
> Here is what i Do and the probleme :
> -----------------------------------
> 1) the Nt Service are OK with oradim.
> 2) i Shutdown the database (shutdown immediate)
> 3) I copy the CTL1xxx.ORA and CTL2xxx.ORA to the place specify by the
> "control_files" parameter int the init.ora
> 4) I copy the init*.ora at the right place.
> 5) I copy all the datafiles (for my SID and foir the system) at the
> right place.
> 6) I copy all the backup archive at the place define by
> "log_archive_dest" in the init*.ora
> 7) Now : Startup the database with "startup".
> Probleme 1 : the instance is not mounting well : ORA-00214 controlfile
> CTL2xxx.ORA version 2817 inconsistent with the file CTL1xxx.ORA
> version 2816
>
> So : I remove the newer controlfile from my "control-files" parameter
> of my init*.ora, And I do another shutdown immediate - Startup. At
> this point, the instance mount ok.
>
> Probleme 2 : but i receive the : Ora-01589 : must use RESETLOGS or
> NORESTLOGS option for database open. Normal you will say.
>
> So : I do : alter database open RESETLOGS
>
> Probleme 3 : I receive : ORa-01195 : online backup of file 1 needs
> more recovery to be consistent WHIT ora-01110 : system datafile.
>
> So : I do : recover database.
>
> Probleme 4 : I receive : ora-00283 : recover cancelled du to error And
> Ora-01610 : recover using the "BACKUP CONTROLFILE" must be done
> (normal again you will say)
>
> So : I do : "recover database using backup controlfile"
>
> Probleme 5 : Oracle ask me to apply all the archive file starting with
> archive 281. here is some detail : (of the instance backuped)
> Oldest online log sequence 280
> Next log sequence to archive 282
> Current log sequence 282
>
> So : I apply archive 281. Oracle tell me that the "log applied" and
> that i don't need it anymore. But oracle ask me To apply
> archive 282. I dont have this archive. It is the current redo log
> file...???
> ------------------------
> So here are my questions :
> ------------------------
> 1) In probleme 1 : Why do i receive the : ORA-00214 ?
> 2) Is this procedure of hot backup OK? if not, what would you change?
> What do I do wrong?
> 3) in probleme 5 : Why does oracle dont tell me that "media recovery
> complete" ?
> ---
> Thanks in advance.
> I'm working on this for a week now and help would be usefull.
> Francois.

  1. You can't back up individual controlfiles, you can only backup 'the' controlfile. Once you startup you need to make sure the 2 controlfiles are identical (using a DOS copy, overwriting the 2nd one) Right now, you are backing up 'the' controlfiles to 2 different files, and likely they are different.
  2. You have a backup controlfile. Hence you have incomplete recovery. Use the command recover database using backup controlfile until cancel When you hit the last archive which you don't have because it is the online redolog, just type CANCEL Apart from using hardcoded filenames and the duplicate backup controlfile to '<file>' your procedure seems to be OK.

You are aware 8.0.4 has been desupported almost immediately? Please upgrade to 8.1.7

--
Hth

--
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address
Received on Tue Apr 16 2002 - 16:05:00 CDT

Original text of this message

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