Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
6Activity
0 of .
Results for:
No results containing your search query
P. 1
How to Create a Physical Standby Database in ORACLE 9i

How to Create a Physical Standby Database in ORACLE 9i

Ratings:

5.0

(1)
|Views: 2,892|Likes:
Published by Rahul Gupta

More info:

Published by: Rahul Gupta on Apr 28, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF or read online from Scribd
See more
See less

08/01/2013

 
 
How To create a Physical Standby database in ORACLE 9i
By : RAHUL GUPTAClient Site : LG Electronics, Greater NoidaCompany : Path InfoTech Limited
Step 1 :
 
Parameter that needed to be entered in the init<SID>.ora of the primary database
log_archive_dest_1 = 'LOCATION=/ms11/arch/m3 MANDATORY'log_archive_dest_state_1 = 'enable'log_archive_start = truelog_archive_dest_2 = 'SERVICE=STANDBY','ARCH SYNC NOAFFIRM delay=0 OPTIONAL max_failure=0reopen=60 register’
OR 
( You can put the whole tns entry of STANDBY database)
log_archive_dest_2 = 'service="(DESCRIPTION=(ADDRESS_LIST =(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.20.180)(PORT=1530)))(CONNECT_DATA=(SID=m3)(SERVER=DEDICATED)))"','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 from0-7200 seconds)
log_archive_dest_state_2='enable'
#log_archive_dest=/home/oracle/proddata/arch
(Comment this parameter on you primary database)
 
Step 2 :
Enter the tns of standby database in the tnsnames.ora of primary
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 = AUTOcontrol_files=/home/users/PROD/m3stndby.ctlstandby_archive_dest = '/ms11/archm3/m3'
 
 log_archive_dest = /ms11/archm3/m3log_archive_start = truedb_file_name_convert = ('/u06/','/u06e/','/u07/','/u07e/') ->
Use this if your directory structure of standby database is different from that of primary database
 log_file_name_convert = ('/u06/','/u06e/','/u07/','/u07e/')->
Use this if your directory structure of standby database is different from that of primary database
Step 4 :(a).
Enter the following in tnsnames.ora of Standby
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
)))
(b).
Enter the following in listner.ora of StandbyPROD_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 :
(a) . Switch one archive on the primaryalter system switch logfile;(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_tablespaceswhere 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 inmode or not .select status,count(*) from v$backup group by status;STATUS COUNT(*)----------------- ----------
 ACTIVE
29
(c) . Now copy all the files from production database to standby database(d)
Now take the tablespace out of begin backup mode
..
select ' alter tablespace '||tablespace_name||' end backup ;' from dba_tablespaceswhere CONTENTS <> 'TEMPORARY';
alter tablespace esvc end backup ;alter tablespace samora end backup;
. . . . . . . . . . . . . . . . . . . .
Run the commands given by the above query . It’ll take all the tablespace out of backup mode . Now check , whether all the filesare out of backup mode or not .
select status,count(*) from v$backup group by status;STATUS COUNT(*)----------------- ----------
 NOT
 
 ACTIVE
29
(d) Once all the files from primary are copied to standby . Then create the standby controlfile as given below :
alter database create standby controlfile as '/home/users/PROD/m3stndby.ctl';
Then , copy this file to the location that you have mentioned in your Standby init.ora
Step 6:
Now up the Standby database as follows
 
(a ) . Up the standby database in nomount state ..startup nomount pfile=’u01/file/initPROD.ora’(b) Mount the standby database
alter database mount standby database ;

Activity (6)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Srinivas Ch liked this
Pankaj Sanwal liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->