Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Do anyone implemented Physical Standby using primary db hot backups?
Here again is a step by step to create a pysical/logical using rman. If
you are only interested in physical, then just avoid to convert your
physical/logical. If you don't want to use rman, than replace all the
rman stuff with you restore backup and perform yourself the roll forward
archives. Adapt your path and note that it is shorter in 10g than in 9i:
Step by step to create standby 9i/10g:
look also to Note:211016.1
Create a physical standby :
-Remove the spfile if any exists, you will have to recreate it later. meantime we modify the init.ora
-add these parameter in the init<standby>.ora
PRIMARY:
*.db_name='asdb'
*.db_unique_name='asdb' # 10g, 9ir2 is LOCK_NAME_SPACE
*.instance_name='asdb'
*.log_archive_dest_1="location=/home/oracle/arch/asdb
VALID_FOR=(ALL_LOGFILES,ALL_ROLES)"
STANDBY:
*.parallel_max_servers=9
*.db_name='asdb'
*.db_unique_name='POLDEV' # 10g, 9ir2 is
LOCK_NAME_SPACE
*.instance_name='POLDEV'
*.log_archive_dest_1="location=/home/oracle/arch/POLDEV
VALID_FOR=(ALL_LOGFILES,ALL_ROLES)"*.log_archive_dest_state_2=enable
*.log_archive_dest_2="location=/home/oracle/arch/POLDEV_2
VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE)"
*.log_archive_dest_state_1=enable
<9ir2 && only if you target a logical, not needed for phisical>
EXECUTE DBMS_LOGSTDBY.BUILD;
</9ir2>
create a standby controlfile:
..............................
copy this archive and all archived since the backup into
log_archive_dest_1 of the standby.
copy the orapw<primary> onto orapw<standby>
STANDBY:
sqlplus '/ as sysdba'
alter database recover managed standby database disconnect ;
exit
Check that the physical standby receives some archives.
++++++++++++++++++++++++++++++++++++++++++++++++++++ END of PHYSICAL STANDBY, rest is for LOGICAL ++
++++++++++++++++++++++++++++++++++++++++++++++++++ ..................................................Convert the physical standby to a logical standby:
..................................................SECONDARY
PRIMARY
SECONDARY
cp '/tmp/logical_stdby.ctl' $ORADATA/control0[1-3].ctl
sqlplus '/ as sysdba'
alter database recover managed standby database;
ALTER DATABASE ACTIVATE STANDBY DATABASE;
shutdown immediate;
startup mount
exit
nid target=sys/change_on_install_at_POLDEV DBNAME=POLDEV # this
will shutdown the DB
==>[Y]
Edit init<standby.ora> and switch
DB_NAME=<primary> to DB_NAME=<stanby>
rm orapw<standby>
orapwd file=orapw<standby> password=change_on_install
sqlplus '/ as sysdba'
create spfile from pfile
startup mount;
alter database open resetlogs ;
ALTER DATABASE RENAME GLOBAL_NAME TO <standby> ;
alter tablespace temp add tempfile '/home/oracle/POLDEV/temp01.dbf' size
20m ;
<9ir2>
ALTER DATABASE REGISTER LOGICAL LOGFILE '/<path>/last logfile>
ALTER DATABASE START LOGICAL STANDBY APPLY INITIAL;
<10g>
ALTER DATABASE START LOGICAL STANDBY APPLY; # At least !<10g>
The SQL apply coordinatory is in initialisation phase :
SELECT NAME, VALUE FROM V$LOGSTDBY_STATS WHERE NAME = 'coordinator state';
PRIMARY
STANDBY
Thanks for your valuable suggestion.
Can you give it to me in plain english. I mean, step by step proecess.
My question is,
When should i copy my redo groups (files) to the standby? Because, hot
backup doesn't contains redo files?
When do I create standby control file? and start restroe and recovery?
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Sep 11 2006 - 04:49:31 CDT
![]() |
![]() |