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: Hot back up problem.

Re: Hot back up problem.

From: David Fitzjarrell <oratune_at_aol.com>
Date: Tue, 19 Dec 2000 15:38:29 GMT
Message-ID: <91nvdl$v5t$1@nnrp1.deja.com>

In our last gripping episode Chris Lee <clee_at_innocent.com> wrote:
> Hi,
>
> I am trying to implement a hot back up scheme to back up my database.
 I
> used the script suggested in Oracle 8i DBA handbook. I backed up the
> tablespaces, archived redo log files, and the control file suggested
 in
> the script provided by the book. Then I shutdowned the database and
> removed all the datafiles, control files, archived redo logs, online
> redo logs. After that, I copied the back up files back to the
> corresponding directories. I was hoping the I could restore the
 database
> when I started up the database again. However, this was the error I
 got:
> ( I am using Oracle 8i (8.1.6) on Solaris 8)
>
> >>>>>
> SVRMGR> startup
> ORACLE instance started.
> Total System Global Area 85299184 bytes
> Fixed Size 69616 bytes
> Variable Size 76660736 bytes
> Database Buffers 8388608 bytes
> Redo Buffers 180224 bytes
> Database mounted.
> ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
>
> SVRMGR>
> SVRMGR> alter database open resetlogs;
> alter database open resetlogs
> *
> ORA-01195: online backup of file 1 needs more recovery to be
 consistent
> ORA-01110: data file 1: '/database/mydb/tabspc/system01.dbf'
> ...
>
> <<<<<
>
> Does anyone know why I will get that error? Did I do something wrong
> when I backed up the files? Here is my script for doing the hot back
 up.
> Is there any suggestion that I can solve this problem?
>
> >>>>>
> #! /bin/sh
>
> # Set up the environment.
> ORACLE_HOME=/u01/app/oracle/product/8.1.6
> export ORACLE_HOME
>
> ORACLE_SID=mydb
> export ORACLE_SID
>
> ORAENV_ASK=NO
> export ORAENV_ASK
>
> PATH=$ORACLE_HOME/bin:$PATH
> export PATH
>
> PASSWD=oracle
> export PASSWD
>
> DbRoot=/database/$ORACLE_SID
>
> TS_DIR=$DbRoot/tabspc
> export TS_DIR
>
> ARCH_DIR=$DbRoot/archive
> export ARCH_DIR
>
> REDO_DIR=$DbRoot/redolog
> export REDO_DIR
>
> HOT_BACKUP_DIR=$DbRoot/backup/hotbackup
> export HOT_BACKUP_DIR
>
> CONTROL_FILE=ctrl_mydb01.ctl
> export CONTROL_FILE
>
> BACKUP_CONTROL_FILE=$DbRoot/backup/$CONTROL_FILE
> export BACKUP_CONTROL_FILE
>
> #
> # Back up the init file.
> #
> cp $ORACLE_HOME/admin/$ORACLE_SID/pfile/init$ORACLE_SID.ora
> $HOT_BACKUP_DIR;
>
> svrmgrl <<EOF1
> connect internal/$PASSWD
>
> REM
> REM Step 1: Back up datafiles.
> REM
>
> REM Back up SYSTEM tablespace
> alter tablespace SYSTEM begin backup;
> !cp $TS_DIR/system01.dbf $HOT_BACKUP_DIR
> alter tablespace SYSTEM end backup;
>
> REM Back up the RBS tablespace
> alter tablespace RBS begin backup;
> !cp $TS_DIR/rbs01.dbf $HOT_BACKUP_DIR
> alter tablespace RBS end backup;
>
> REM Back up the data tablespaces
> alter tablespace USERS begin backup;
> !cp $TS_DIR/users01.dbf $HOT_BACKUP_DIR
> alter tablespace USERS end backup;
>
> REM Back up the TOOLS tablespaces
> alter tablespace TOOLS begin backup;
> !cp $TS_DIR/tools01.dbf $HOT_BACKUP_DIR
> alter tablespace TOOLS end backup;
>
> REM Back up the INDX tablespace
> alter tablespace INDX begin backup;
> !cp $TS_DIR/indx01.dbf $HOT_BACKUP_DIR
> alter tablespace INDX end backup;
>
> REM Back up the TEMP tablespace
> alter tablespace TEMP begin backup;
> !cp $TS_DIR/temp01.dbf $HOT_BACKUP_DIR
> alter tablespace TEMP end backup;
>
> REM
> REM Step 2: Back up the archived redo log files.
> REM
>
> REM Stop the archiving process.
> archive log stop
>
> exit
> EOF1
>
> # Back up archive log files.
> ArchFiles=`cd $ARCH_DIR; ls ./*.arc`;
>
> # Restart archiving process.
> svrmgrl <<EOF2
> connect internal/$PASSWD
> archive log start;
> exit
> EOF2
> #
> # Back up the archived redo logs to the tape.
> cd $ARCH_DIR;
> cp $ArchFiles $HOT_BACKUP_DIR;
>
> #
> # Step 3. Back up the control file to a disk file.
> #
>
> svrmgrl <<EOF3
> connect internal/$PASSWD
> alter database backup controlfile to '$HOT_BACKUP_DIR/$CONTROL_FILE';
> exit
> EOF3
>
> #
> # End of hot backup script.
> #
> <<<<<
>
> Thanks,
>
> -- Chris
>

It would appear that your problem begins with the removal of the online redo logs. These were not backed up yet you removed them. Then you replaced all of your database files from the hot backup. With the online redo logs now gone you have no hope of restoring the tablespaces to the point in time of failure. Archived redo logs contain transaction information, this is true, however these need to be used in conjunction with the online redo logs to fully recover a database to the point of failure. When you trashed your online redo you killed any chance of complete recovery.

I doubt that you'll be able to open your database, especially since the SYSTEM tablespace is the one affected. You might try cancel-based recovery; if that is successful you'll get the database open but you'll likely have missing transactions.

--
David Fitzjarrell
Oracle Certified DBA


Sent via Deja.com
http://www.deja.com/
Received on Tue Dec 19 2000 - 09:38:29 CST

Original text of this message

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