1. Show the following parameter values: db_file_name_convert and log_file_name_convert.
SQL> show parameter file_name_convert
2. Take a backup of the primary database control file and copy it to standby database /rman location
SQL> ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/tmp/dbname_standby_controlfile.ctl' REUSE;
$ scp dbname_standby_controlfile.ctl dr_db_server:/tmp
3. Get the directories for the control file to be copied on the Standby database
SQL> show parameter control
/control01.ctl
/control02.ctl
4. Drop the database.
SQL> shutdown immediate;
SQL> startup mount restrict;
SQL> select name, open_mode from v$database;
SQL> drop database;
SQL> exit;
5. Shutdown the database and start it up in nomount
SQL> startup nomount
6. Restore the control file to the new locations
$ rman target / nocatalog
RMAN> restore controlfile to '/control01.ctl' from '/tmp/dbname_standby_controlfile.ctl';
RMAN> restore controlfile to '/control02.ctl' from '/tmp/dbname_standby_controlfile.ctl';
7. Mount database as standby
SQL> alter database mount standby database;
8. Catalog backup pieces
$ rman target / nocatalog
RMAN> catalog start with '/mnt/';
Note: the last foward slash
9. Restore and recover the database
run {
restore database;
recover database;
}
10. Execute the script to sync standby with production
$ ksh standby_resync.sh
11. Ensure the DBs are in sync on both standby and Primary
SQL> archive log list
SQL> select max(sequence#) from v$archived_log where applied='YES';