On Standby

SQL>alter database recover managed standby database cancel;
SQL> select current_scn from v$database;

CURRENT_SCN
-----------
485739

Connect to the primary database using RMAN.

[oracle@secondary ~]$ export ORACLE_SID=standby
[oracle@secondary ~]$ rman target sys/sys@orcl

Recovery Manager: Release 10.2.0.1.0 - Production on Thu Jan 19 07:01:18 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.

connected to target database: ORCL (DBID=1299658972)

RMAN> backup incremental from scn 485739 database
2> format '/u01/app/oracle/backup/forstand_%U' tag 'forstand';

On Primary
Copy from primary to standby machine.

scp /u01/app/oracle/backup/forstand_* 192.168.1.162:/u01/app
/oracle/backup/

On Standby

[oracle@secondary ~]$ export ORACLE_SID=standby
[oracle@secondary ~]$ rman target=/

RMAN> catalog start with '/u01/app/oracle/backup/forstand';


RMAN> recover database noredo;


On Primary

RMAN> backup current controlfile for standby format '/u01/app/oracle
/backup/forstandctrl.bck';

[oracle@vmlinux1 ~]$ scp /u01/app/oracle/backup/forstandctrl.bck
192.168.1.162:/u01/app/oracle/backup/


On Standby

SQL> shutdown
SQL> startup nomount;
[oracle@vmlinux2 ~]$ export ORACLE_SID=standby
[oracle@vmlinux2 ~]$ rman target = /

RMAN> restore standby controlfile from '/u01/app/oracle/backup/forstandctrl.bck';
RMAN> shutdown;
RMAN> startup mount;

It is assumed here the primary and standby database data file
directories are identical.

SQL> select distinct group#, type from v$logfile order by group#;

GROUP# TYPE
---------- -------
1 ONLINE
2 ONLINE
3 ONLINE
4 STANDBY
5 STANDBY
6 STANDBY
7 STANDBY

7 rows selected.

SQL> alter database clear logfile group 1;
SQL> alter database clear logfile group 2;
SQL> alter database clear logfile group 3;
SQL> alter database clear logfile group 4;
SQL> alter database clear logfile group 5;
SQL> alter database clear logfile group 6;
SQL> alter database clear logfile group 7;

My Standby database previously had flashback.

SQL> alter database flashback off;

Database altered.

SQL> alter database flashback on;

Database altered.

SQL> alter database recover managed standby database disconnect
from session;

Database altered.