Professional Documents
Culture Documents
ALTER DATABASE CREATE STANDBY CONTROLFILE AS Copy and paste in respect control file directories in standby database server.
‘/yourdir/control1.ctl’;
db_name=primdb db_name=primdb
control_files=’/.../standby/control_01.ctl’
remote_login_passwordfile=exclusive
db_file_name_convert=(’.../oradata/primdb/data1/’,’.../oradata/standdb/data1/’,
log_archive_dest_1=(’LOCATION=/disk1/oracle
’.../oradata/primdb/data2/’,’.../oradata/standdb/data2/’)
/oradata/primdb/arch’)
log_file_name_convert==(’.../oradata/primdb/logsa/’,’.../oradata/standdb/logsa/’,
log_archive_dest_2=(‘SERVICE=standdb lgwr sync’)
’.../oradata/primdb/logsb/’,’.../oradata/standdb/logsb/’)
FAL_SERVER=standdb standby_file_management=AUTO
FAL_CLIENT=primdb
remote_login_passwordfile=exclusive
Step By Step DATAGUARD - Within 2 hours U CAN Become a Dataguard Implementer
log_archive_start=TRUE
standby_archive_dest=’/disk1/oracle/oradata/standdb/arch’
# The following parameter is required only if the primary and standby
log_archive_format=log%d_%t_%s.arc
databases
log_archive_dest_1=(’LOCATION=/disk1/oracle/oradata/standdb/arch’)
#are located on the same system.
lock_name_space=primdbe log_archive_dest_2=(‘SERVICE=primdb lgwr sync’) #For manuall switchover
remote_archive_enable=TRUE
initprimdb.ora
Example implemented pfile: #Standby parameters
FAL_SERVER=primdb
FAL_CLIENT=standdb
#Note:
#All location related parameters , need to be changed respect to the directories created
# The following parameter is required only if the primary and standby databases
lock_name_space=standdb
initstanddb.ora
Example implemented pfile:
Create Oracle Net Service Names for standby database Create Oracle Net Service Names for primary database
(Having both Primary & Standby database tns entries is standard (Having both Primary & Standby database tns entries is standard practice)
practice)
configure a listener for the respective databases and restart the listener configure a listener for the respective databases and restart the listener
SQLNET.EXPIRE_TIME=2
STARTUP NOMOUNT pfile=’/.../standby/pfile/initstanddb.ora’;
ALTER DATABASE MOUNT STANDBY DATABASE;
Verifying Standby Archive destination log shipping: Initiate Log Apply Services
This query includes the DISCONNECT FROM SESSION option so that log apply
services run in a background session.
SELECT SEQUENCE#,STATUS FROM V$MANAGED_STANDBY;
SWITCH OVER
shutdown normal
startup mount
alter database set standby database to maximize availability;
alter database open;
select protection_mode from v$database;
Ensure all activities on the primary and standby database are ended
shutdown immediate;
startup nomount;
alter database mount standby database;
shutdown normal;
startup;
To change the role again as Primary follow the same steps as To change the role again as standby follow the same steps as mentioned above
mentioned above
primedb_roughwork_ standdb_roughwork_
implementation.txt implementation.txt
With Cheers
Palaniyappan.T
Senior Oracle Database Administrator
Hewlett Packard Globalsoft Pvt. Ltd.,
palani.ora@gmail.com