Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Recovery time
We are currently trying to test our backup/restore/recover procedures
at work. We are new to RMAN and I am new to Oracle. On small
databases we have been able to use RMAN along with Veritas to backup to
tape and restore/recover a database. We have now moved the same
scripts to attempt the procedures on a production database.
Our production configuration switches redo at 3G and this happens about every 24 hours. The attempt to backup and restore goes as expected however when attempting to recover the archive redo, Oracle just keeps working for what seems to be forever. We have let this process continue for 2 days now and it still did not complete.
For our second attempt we changed a configuration to make Oracle do a checkpoint every 30 minutes. Now the archive redo switches files every 30 minutes and file sizes are around 200 Megabytes. The active redo is still 3G but we believed we might see progress if the archive logs were smaller. The next attempt to backup/restore/recover went just like the first, when it gets to work on the first 200M archive log file it just keeps working on it. We let it run for 8 hours before stopping it.
We are attempting to recover this database on a significantly smaller hardware (2 gigs of memory vs 8 gigs of memory) however there is plenty of disk space.
Here is a copy of our backup script just in case this helps pin point the cause of our frustration. Any help would be greatly appreciated.
Thanks
Ahnjoan
#!/bin/sh
# $Header: hot_database_backup.sh,v 1.2 2002/08/06 23:51:42 $
#
#bcpyrght
#***************************************************************************
#* $VRTScprght: Copyright 1993 - 2003 VERITAS Software Corporation, All
Rights R
eserved $ *
#***************************************************************************
#ecpyrght
#
#
#
CUSER=`id |cut -d"(" -f2 | cut -d ")" -f1`
#
RMAN_LOG_FILE=/ora4/bkp_logs/`date +%m_%d_%y_%H:%M:%S`.bkp.log
#
if [ -f "$RMAN_LOG_FILE" ]
then
rm -f "$RMAN_LOG_FILE"
fi
echo "$RMAN_LOG_FILE" > /opt/openv/netbackup/daily_file
# -----------------------------------------------------------------
# Initialize the log file.
# -----------------------------------------------------------------
echo >> $RMAN_LOG_FILE
chmod 666 $RMAN_LOG_FILE
#
echo Script $0 >> $RMAN_LOG_FILE
echo ==== started on `date` ==== >> $RMAN_LOG_FILE
echo >> $RMAN_LOG_FILE
#
ORACLE_HOME=/ora1/oracle/OraHome1
export ORACLE_HOME
#
ORACLE_SID=arcsight
export ORACLE_SID
#
ORACLE_USER=oracle
#
TARGET_CONNECT_STR=/
#
RMAN=$ORACLE_HOME/bin/rman
#
echo >> $RMAN_LOG_FILE
echo "RMAN: $RMAN" >> $RMAN_LOG_FILE echo "ORACLE_SID: $ORACLE_SID" >> $RMAN_LOG_FILE echo "ORACLE_USER: $ORACLE_USER" >> $RMAN_LOG_FILE echo "ORACLE_HOME: $ORACLE_HOME" >> $RMAN_LOG_FILE
echo "SBT_TAPE: $SBT_TAPE" >> $RMAN_LOG_FILE
#
echo >> $RMAN_LOG_FILE echo "NB_ORA_FULL: $NB_ORA_FULL" >> $RMAN_LOG_FILE echo "NB_ORA_INCR: $NB_ORA_INCR" >> $RMAN_LOG_FILE echo "NB_ORA_CINC: $NB_ORA_CINC" >> $RMAN_LOG_FILE echo "NB_ORA_SERV: $NB_ORA_SERV" >> $RMAN_LOG_FILE echo "NB_ORA_POLICY: $NB_ORA_POLICY" >> $RMAN_LOG_FILE
#
echo >> $RMAN_LOG_FILE
#
if [ "$NB_ORA_FULL" = "1" ]
then
echo "==== Full backup requested ====" >> $RMAN_LOG_FILE BACKUP_TYPE="INCREMENTAL LEVEL=0"
elif [ "$NB_ORA_INCR" = "1" ]
then
echo "==== Differential incremental backup requested ====" >>
$RMAN_LOG_
FILE
BACKUP_TYPE="INCREMENTAL LEVEL=1"
elif [ "$NB_ORA_CINC" = "1" ]
then
echo "==== Cumulative incremental backup requested ====" >>
$RMAN_LOG_FI
LE
BACKUP_TYPE="INCREMENTAL LEVEL=1 CUMULATIVE"
elif [ "$BACKUP_TYPE" = "" ]
then
echo "==== Default - Full backup requested ====" >>
$RMAN_LOG_FILE
BACKUP_TYPE="INCREMENTAL LEVEL=0"
fi
#
# specify environment variables. In other words, when accessing a
database
# through a listener, the environment variables set at the system
level are not
# visible when RMAN is running. For more information on the
environment
# variables, please refer to the NetBackup for Oracle Admin. Guide.
#
#
CMD_STR="
ORACLE_HOME=$ORACLE_HOME
export ORACLE_HOME
ORACLE_SID=$ORACLE_SID
export ORACLE_SID
$RMAN target $TARGET_CONNECT_STR nocatalog msglog $RMAN_LOG_FILE append
<< EOF
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
BACKUP
$BACKUP_TYPE
SKIP INACCESSIBLE
TAG terra_hot_db_bk_level0
FILESPERSET 5
# recommended format
FORMAT 'bk_%s_%p_%t'
DATABASE;
sql 'alter system archive log current';
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
# backup all archive logs
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
BACKUP
filesperset 20
FORMAT 'al_%s_%p_%t'
ARCHIVELOG ALL DELETE INPUT;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
#
# Note: During the process of backing up the database, RMAN also backs
up the
# control file. This version of the control file does not contain the
# information about the current backup because "nocatalog" has been
specified.
# To include the information about the current backup, the control file
should
# be backed up as the last step of the RMAN section. This step would
not be
# necessary if we were using a recovery catalog.
#
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
BACKUP
# recommended format
FORMAT 'cntrl_%s_%p_%t'
CURRENT CONTROLFILE;
RELEASE CHANNEL ch00;
}
EOF
"
# Initiate the command string
if [ "$CUSER" = "root" ]
then
su - $ORACLE_USER -c "$CMD_STR" >> $RMAN_LOG_FILE
RSTAT=$?
else
/usr/bin/sh -c "$CMD_STR" >> $RMAN_LOG_FILE
RSTAT=$?
fi
#
if [ "$RSTAT" = "0" ]
then
LOGMSG="ended successfully"
else
LOGMSG="ended in error"
fi
echo >> $RMAN_LOG_FILE
echo Script $0 >> $RMAN_LOG_FILE
echo ==== $LOGMSG on `date` ==== >> $RMAN_LOG_FILE
echo >> $RMAN_LOG_FILE
exit $RSTAT Received on Thu Nov 10 2005 - 07:33:24 CST