Professional Documents
Culture Documents
By : RAHUL GUPTA
Client Site : LG Electronics, Greater Noida
Company : Path InfoTech Limited
Step 1 : Parameter that needed to be entered in the init<SID>.ora of the primary database
log_archive_dest_state_1 = 'enable'
log_archive_start = true
log_archive_dest_2 = 'service="(DESCRIPTION=(ADDRESS_LIST =
(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.20.180)(PORT=1530)))(CONNECT_DATA=(SID=m3)(SERVER=DEDIC
ATED)))"','ARCH SYNC NOAFFIRM delay=0 OPTIONAL max_failure=0 reopen=60 register '
standby_file_management=auto
#*.archive_lag_target = 1800 (You can use this parameter for the automatic switching of archive log in primary. Its value differ from
0-7200 seconds)
log_archive_dest_state_2='enable'
STANDBY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.180)(PORT = 1530))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PROD)
)
)
Step 3 : Parameter that needed to be entered in the init<SID>.ora of the standby database
fal_client = 'PROD_stdby'
fal_server = 'PROD_prim'
standby_file_management = AUTO
control_files=/home/users/PROD/m3stndby.ctl
standby_archive_dest = '/ms11/archm3/m3'
log_archive_dest = /ms11/archm3/m3
log_archive_start = true
Step 4 :
PROD_prim =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.245)(PORT = 1523))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PROD)
)
)
PROD_stdby =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.180)(PORT = 1530))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PROD)
)
)
PROD_stdby =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.180)(PORT = 1530))
)
SID_LIST_PROD_stdby =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = PROD)
(ORACLE_HOME = /ms10/oracle/9.2.0)
(SID_NAME = PROD )
)
)
Step 5 :
(b). Now take the tablespace of primary in backup mode [ If you want to create the database using hot backup ]
select ' alter tablespace '||tablespace_name||' begin backup ;' from dba_tablespaces
where CONTENTS <> 'TEMPORARY';
alter tablespace esvc begin backup ;
alter tablespace samora begin backup;
. . . . . .. . .
. . . .. . . . . .
Run the commands given the above query . It’ll bring all the tablespace in backup mode .
Now before copying the files to the standby database . Check whether all files are in
mode or not .
STATUS COUNT(*)
----------------- ----------
ACTIVE 29
(c) . Now copy all the files from production database to standby database
select ' alter tablespace '||tablespace_name||' end backup ;' from dba_tablespaces
where CONTENTS <> 'TEMPORARY';
Run the commands given by the above query . It’ll take all the tablespace out of backup mode . Now check , whether all the files
are out of backup mode or not .
STATUS COUNT(*)
----------------- ----------
NOT ACTIVE 29
(d) Once all the files from primary are copied to standby . Then create the standby controlfile as given below :
Then , copy this file to the location that you have mentioned in your Standby init.ora
(c)
C.1 # If you have restarted your primary database . Then take the standby database in managed recover mode
C.2 # If you havn’t restarted your primary database . Then manually transfer the archive from primary
to archive location of standby database . And run the command given below .
Here , choose the “AUTO” option . It’ll apply all the archives .
===========================================================================
In this case a parameter “LOCK_NAME_SPACE” need to be used . If the standby database resides on the same file
system as the primary database, set LOCK_NAME_SPACE in the standby initialization parameter file to a distinct value
such as the following:
LOCK_NAME_SPACE = standby
And put the parameter “instance_name” in init.ora of Primary and Standby , giving suitable
value
Note 2 : How to check the max archive log number that has been applied to the standby ..
#######################################################################################################
@ Thanks for reading this doc. Any suggestion on this or any changes ( or more information that you want to add in this doc )
will be highly appreciated and welcomed . You can mail that to me on my id ecengineer84@gmail.com