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: RMAN incarnations and duplicate for standby

Re: RMAN incarnations and duplicate for standby

From: <martins_at_imagenet.co.uk>
Date: 20 Nov 2003 08:35:03 -0800
Message-ID: <db24bcb4.0311200835.59ed3216@posting.google.com>


Kaptain(!?) i recently had to go through all of this, rather than answer it point by point, heres how i resolved all of it.

  1. Create standby controlfile in each back. In my RMAN script i added "include current controlfile for standby;". This made the full backup script:

run {
# Hot database level 0 whole backup

configure controlfile autobackup on;
allocate channel t1 type 'SBT_TAPE';
allocate channel t2 type 'SBT_TAPE';

backup
  incremental level 0
  skip inaccessible
  tag hot_bk_week_level0
  filesperset 5
# recommended format

  format 'imgoradb_bk_%s_%p_%T'
    database
    include current controlfile for standby;   sql 'alter system archive log current';
# backup all archive logs

  backup
   filesperset 20
   format 'imgoradb_al_%s_%p_%T'
   (archivelog all
    delete input
   );
}

It's an overhead, but for a 750Gb database, not a big one.

2. Use backup to build standby.
Once i wanted to build the standby, using the latest full backup generated above, you do two things.
a) Find the correct SCN - find the archive logs in the backup (from the RMAN logfile) and find the highest 'NEXT_SCN' acroos them all. Then 'plug' that in to the 'SET UNTIL SCN' line in the script below (we had different file structures):

run
{
  SET UNTIL SCN 799158965 ;
# allocate channel t1 type 'SBT_TAPE';
  ALLOCATE AUXILIARY CHANNEL dup1 DEVICE TYPE 'SBT_TAPE'     parms="ENV=(NB_ORA_CLASS=imgoradb_ora_hot_weekly_new, NB_ORA_SERV=imgsrv01, NB_ORA_CLIENT=imgsrv01)";   ALLOCATE AUXILIARY CHANNEL dup2 DEVICE TYPE 'SBT_TAPE'     parms="ENV=(NB_ORA_CLASS=imgoradb_ora_hot_weekly_new, NB_ORA_SERV=imgsrv01, NB_ORA_CLIENT=imgsrv01)";   SET NEWNAME FOR DATAFILE 3 TO '/oracle/oradev01/stby/cwmlite01.dbf' ;
  SET NEWNAME FOR DATAFILE 4 TO '/oracle/oradata01/stby/drsys01.dbf' ;   ...
  SET NEWNAME FOR DATAFILE 48 TO '/oracle/oradata01/stby/users07.dbf' ;
  DUPLICATE TARGET DATABASE FOR STANDBY
    DORECOVER;
}

This then uses the correct SCN, which when you connect to the target (primary) database means it 'knows' that you have a standby control file on tape frm your last backup Received on Thu Nov 20 2003 - 10:35:03 CST

Original text of this message

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