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: <ordabber_at_my-deja.com>
Date: Tue, 19 Dec 2000 20:29:56 GMT
Message-ID: <91ogfp$fkn$1@nnrp1.deja.com>

Chris,

Look for the _quick_cloning_technique_ article in Oracle Magazine. There are ksh-scripts to automate the cloning procedure. As an Oracle NT user, I never tried them, but they were my basis to create a procedure to clone the production database (not with a hot backup as explained in the article but with a cold backup - after a _shutdown normal_.

Here's the link to the article. There you will find the ksh-scripts. http://www.oracle.com/oramag/oracle/00-Mar/o20dba.html

In article <3A3F6B9E.6CEBB30E_at_innocent.com>,   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
>

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

Original text of this message

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