01.01. Creation configuration PRIMARY-STANDBY and tisting switchover

                   <<< Back   Next >>>
1. Server list
 PRIMARY:    ora-fsfo-db01 (192.168.1.61)
 STANDBY:   ora-fsfo-db02 (192.168.1.62)
 OBSERVER: ora-fsfo-app01 (192.168.1.67)

2. cat /etc/hosts
192.168.1.61 ora-fsfo-db01.oracak.com ora-fsfo-db01
192.168.1.62 ora-fsfo-db02.oracak.com ora-fsfo-db02
192.168.1.67 ora-fsfo-app01.oracak.com ora-fsfo-app01

3. cat $ORACLE_HOME/network/admin/tnsnames.ora on ora-fsfo-db01
LISTENER=(DESCRIPTION_LIST=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora-fsfo-db01)(PORT=1521))))
SID_LIST_LISTENER=
  (SID_LIST=
     (SID_DESC=(GLOBAL_DBNAME=bank01)(SID_NAME=bank)(ORACLE_HOME=/u01/app/oracle/19.0/dbhome_1))
     (SID_DESC=(GLOBAL_DBNAME=bank01_DGMGRL)(SID_NAME=bank)(ORACLE_HOME=/u01/app/oracle/19.0/dbhome_1)))

4. cat $ORACLE_HOME/network/admin/tnsnames.ora on ora-fsfo-db02
LISTENER=(DESCRIPTION_LIST=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora-fsfo-db02)(PORT=1521))))
SID_LIST_LISTENER=
  (SID_LIST=
     (SID_DESC=(GLOBAL_DBNAME=bank02)(SID_NAME=bank)(ORACLE_HOME=/u01/app/oracle/19.0/dbhome_1))
     (SID_DESC=(GLOBAL_DBNAME=bank02_DGMGRL)(SID_NAME=bank)(ORACLE_HOME=/u01/app/oracle/19.0/dbhome_1)))

5. cat $ORACLE_HOME/network/admin/tnsnames.ora on ora-fsfo-db01 and on ora-fsfo-db02
bank01=(DESCRIPTION =(ADDRESS =(PROTOCOL = TCP)(Host = ora-fsfo-db01)(Port = 1521))(CONNECT_DATA = (SERVICE_NAME=bank01)))
bank02=(DESCRIPTION =(ADDRESS =(PROTOCOL = TCP)(Host = ora-fsfo-db02)(Port = 1521))(CONNECT_DATA = (SERVICE_NAME=bank02)))

6. Altering database and creating ADG configuration
SQL> 
alter system set dg_broker_start=true;
alter database add standby logfile group 11  ('/u01/oradata/bank/redo01_st.log') size 256m;
alter database add standby logfile group 12  ('/u01/oradata/bank/redo02_st.log') size 256m;
alter database add standby logfile group 13  ('/u01/oradata/bank/redo03_st.log') size 256m;
alter database add standby logfile group 14  ('/u01/oradata/bank/redo04_st.log') size 256m;
dgmgrl>
create configuration 'cfg_bank' as primary database is 'bank01' connect identifier is  bank01;
add database 'bank02' as connect identifier is bank02 maintained as physical;
enable configuration;
show configuration;


7. Testing configuration. Switchover.
dgmgrl>
connect sys/***
switchover to bank02;
show configuration;
                   <<< Back   Next >>>

No comments:

Post a Comment