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: backing up standby db

Re: backing up standby db

From: Charles J. Fisher <cfisher_at_rhadmin.org>
Date: Thu, 13 Nov 2003 19:31:23 GMT
Message-ID: <Pine.BSO.4.53.0311131317450.11408@bart.rhadmin.org>


On Tue, 4 Nov 2003, Phillip Tien wrote:

> I'm trying to back up my standby database through rman and I'm running
> into a RMAN-00600 error. I've already filed a tar with metalink but I
> was hoping to see if anyone out there has had experience with backing up
> a standby database. Here's my situation:

Under Oracle 7 & 8, the standby is only refreshed at a master log switch.

Under Oracle 7, you have to explicitly prod the server to apply waiting archived logs. Oracle 8 has some method to do this automatically.

Under Oracle 9, you now have the option to directly connect the LGWR processes between the standby and the master and apply transactions to both systems in real time, not just at a log switch.

If you are using the Oracle 7 method, I believe that you can just make sure that you aren't applying any logs, and you can copy the datafiles (aka a cold backup). You might shut down the server just to be sure - test extensively. If you are using Oracle 8, just do it the Oracle 7 way. I use a shell script launched by crontab once a minute, and shutting it off is easy (here I assume that $ORACLE_HOME/arch is nfs-mounted read-only):

#!/bin/sh
# Stand-By Sync - Prod an Oracle server to apply logs if they exist. if [ -f ~/.RECOVERING-$ORACLE_SID ]
then

        exit
else

        ITWANTS=`tail -100 $ORACLE_HOME/bdump/alert_$ORACLE_SID.log |
                fgrep 'Media Recovery Log /' | tail -1 | awk '{print $4}'`

        if [ -f "$ITWANTS" ]
        then
                touch ~/.RECOVERING-$ORACLE_SID

                $ORACLE_HOME/bin/svrmgrl > /dev/null 2>&1 <<-EOF
                        connect internal
                        recover automatic standby database;
                        cancel
                        quit
                EOF

                rm -f ~/.RECOVERING-$ORACLE_SID
        fi

fi

Under Oracle 9, I have no clue how to do backups with the direct LGWR connection.

I do despise RMAN, though.


   / Charles J. Fisher                   |"The prettiest girls in the world  /
  /  cfisher_at_rhadmin.org                 | live in Des Moines, Iowa."       /
 /   http://rhadmin.org                  |   -Jack Kerouac                 /
---------------------------------------------------------------------------
Received on Thu Nov 13 2003 - 13:31:23 CST

Original text of this message

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