* ON STANDBY {noformat} sqlplus / as sysdba SQL>startup mount SQL>select current_scn from v$database; CURRENT_SCN ----------- 151214061 {noformat} * ON LIVE {noformat} export ORACLE_SID=FOSDB . oraenv $ORACLE_HOME/bin/rman nocatalog RMAN>connect target DBA_CRON/DBA_CRON RMAN>backup incremental from scn 151214061 database format '/b01/volbackupfos/FOSDB/201002/ForStandby_%U' tag 'FORSTANDBY'; RMAN>backup current controlfile for standby format '/b01/volbackupfos/FOSDB/201002/ForStandby_ctl.bkp'; scp * oracle@slofosdb01:/u03/volfoslivedata01/oradata/201002 {noformat} OR - actually did a full backup and transfer {noformat} RMAN>backup full database format '/b01/volbackupfos/FOSDB/201002/ForStandby_%U' tag 'FORSTANDBY'; RMAN>backup current controlfile for standby format '/b01/volbackupfos/FOSDB/201002/ForStandby_ctl.bkp'; scp * oracle@slofosdb01:/u03/volfoslivedata01/oradata/201002 {noformat} {noformat} * Must stop dataguard or recovery complains cannot get unique lock on files sqlplus / as sysdba SQL> alter database recover managed standby database cancel; {noformat} * ON STANDBY {noformat} $ORACLE_HOME/bin/rman nocatalog RMAN> connect target DBA_CRON/DBA_CRON RMAN> shutdown immediate; RMAN> startup nomount; RMAN> restore standby controlfile from '/u03/volfoslivedata01/oradata/201002/ForStandby_ctl.bkp'; RMAN> shutdown immediate; RMAN> startup mount RMAN> -- Catalog the copied files RMAN> catalog start with '/u03/volfoslivedata01/oradata/201002/' RMAN> restore database; RMAN> recover database noredo; RMAN> exit {noformat} {noformat} sqlplus / as sysdba SQL>startup mount SQL> alter database recover managed standby database disconnect; {noformat} * Needed to recreate STANDBY LOGFILEs as named differently from source db {noformat} sqlplus / as sysdba SQL> alter database recover managed standby database cancel; Database altered. select 'alter database drop standby logfile group ' group# ';' from v$standby_log; --Run generated script --This plus others ALTER DATABASE ADD STANDBY LOGFILE '/u02/volfoslivelogs01/oradata/FOSDGFOSDB_1srl2.f' SIZE 100M REUSE; {noformat} sqlplus / as sysdba SQL>startup mount SQL> alter database recover managed standby database disconnect; {noformat} |
Wednesday, 10 February 2010
Oracle Dataguard : Bring standby in line using rman
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment