Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: RMAN incarnations and duplicate for standby
Kaptain(!?) i recently had to go through all of this, rather than
answer it point by point, heres how i resolved all of it.
run {
# Hot database level 0 whole backup
configure controlfile autobackup on; allocate channel t1 type 'SBT_TAPE'; allocate channel t2 type 'SBT_TAPE';
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