You are on page 1of 2

We can have 30 stand by database in oracle 11g release 2, earlier it was 9

Physical structure should be same on both the databases (primary and secondary) for
phyisical standby

On primary DB set -
1)alter system set db_unique_name=<name of the primary database> scope=spfile;
2)alter system set log_archive_config='dg_config=(primary database name, secondary
database name)' scope=spfile;
3)alter system set log_archive_dest_1='location=<location path>
valid_for(all_files,all_roles) db_unique_name=<primary database name> scope=spfile;
4)alter system set log_archive_dest_2='service=<secondary database service name>
valid_for=<online_logfiles,primary_role> db_unique_name=<secondary database name>'
scope=spfile;
5)alter system set standby_file_management=auto scope=spfile; (Only applicable to
Phyisical Standby databases)
6)if physical struture of primary and secondary are different-
alter system set
db_file_name_convert='secondary_database_name','primary_database_name'
scope=spfile;
alter system set
log_file_name_convert='secondary_database_name','primary_database_name'
scope=spfile;
7)startup force;
8)take hot backup manually pf primary database-
alter system archive log current;
9)select * from v$backup;
10)alter database begin backup;
11)select * from v$backup;
12)copy *.dbf to a directory on primary database server - example: /backup
13)alter database end backup;
14)select * from v$backup;
15)alter system switch archive log current;
16)alter database create standby controlfile as '/dbbackup/controfilename.sty';
17)then go to backup folder where you have created backup of datafiles and
controlfiles and copy to secondary server
18)then change the controfilename.sty to controfile1.ctl over secondary database
server;
19)make 3 copies of controlfile on secondary database server;
20)creata a pfile for the secondary database over ORACLE_HOME/database path
location;
vi secondary_database_name.ora
set db_name=<primary_database_name>
21)then create a instance over secondary database server-
oradim -new -sid <secondary_database_name>
22)Then start the service of newly created instance
23)Export ORACLE_SID newly created instance name
24)connect to sqlplus -
sqplus / as sysdba
25)then create spfile from pfile-
create spfile from pfile;
26)then login to sqlplus on secondary-
startup nomount;
27)on secondary -
SQL>alter system set db_unique_name=finance2 scope=spfile;
28)alter system set log_archive_config='dg_config=(primary database name, secondary
database name) scope=spfile;
29)set archive log destination on secondary database server-
alter system set log_archive_dest_1='location=<location path>
valid_for(all_files,all_roles) db_unique_name=<secondary database name>
scope=spfile;
30)alter system set log_archive_dest_2='location=<primary database service name>
valid_for=<online_logfiles,primary_role> db_unique_name=<secondary database name>'
scope=spfile;
31)alter system set
db_file_name_convert='primary_database_name','secondary_database_name'
scope=spfile;
31)alter system set
log_file_name_convert='primary_database_name','secondary_database_name'
scope=spfile;
31)startup nomunt force on secomdary server
31)create pfile from spfile on secondary server
31)edit secondary database pfile and add controfile location to startup the
database;
32)startup mount on standby database;
33)set arcchive log source on secondary database server-
set logsource 'location of primary datbase server archive log location';
34)recover standby database until cancel using backup controlfile;
35)recover managed standby database disconnect from session;
36)make sure listerner.ora and tnsnames.ora are configured properly for primary and
secondary database. 2 database should communicate with each other using tnsping

on primary database-
37)shutdown database and startup mount;