|
How to set the database in standby server ? A primary database can have more than 10 standby server. First Set The Primary Database in archive log
|
|
create standby controlfile Alter database create standby controlfile as 'c:\oracle\stand.ctl'; Alter database open; |
|
create the parameter file from spifle for primary create pfile=c:oracle\init.ora from spifle; |
|
edit the following in primary database init.ora file
log_archive_config='DG_CONFIG=(orcl,stby)' /*primary database archive location and also connect string */ log_archive_Dest_1='LOCATION=c:\oracle\orcl\arch valid_for= (ALL_LOGFILES,ALL_roles) DB_UNIQUE_NAME=orcl' /* service name fror standby service */ log_archive_dest_2='SERVICE=stby LGWR ASYNC valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=stby' log_archive_Dest_state_1=ENABLE log_archive_Dest_state_2=ENABLE remote_login_passwordfile=exclusive fal_server=stby fal_Client=orcl standby_file_management=auto db_file_name_convert='C:\oracle\product\10.2.0\oradata\stby', 'C:\oracle\product\10.2.0\oradata\orcl' /* First location of standby should be specified and then primary be specified */ |
|
Create the parameter file for standby database |
|
Shutdown the database create a secondary folder for standby copy the datafiles ,logfiles from primary to secondary Folder |
|
use oradim to create a service for standby in admin/service section oradim -new -sid stby -intpwd oracle -startmode manual also give the password |
|
configure the listener Use netmanager to add database service for both primary and standy in listener configure tnsnames.ora Use netmanager to add service for both primary and standby start primary database create spfile from the pfile through which primary was opend |
|
start the standby startup nomount pfile=c:\oracle\inits.ora alter datbaase mount standby datbase; |
|
start managed recovery for standby alter database recover managed standby database disconnect from session; |
|
To open the database in read only. alter database recover managed standby database cancel; ![]() alter database open read only; |
|