Saturday, 21 June 2025

Oracle 19C 2 Node RAC Dataguard complete setup step by step process

 Hi All,


In this post i am sharing Oracle 19C RAC 2 Node RAC Dataguard setup.

For this Lab  i have used 4 Virtual machines for Primary and standby servers configurations.

My Primary & Standby Environment details:

======================= =============



>> Primary node (we take as Production - its a live data / live business) .

>> we need to build the standby database for production High availability, in case of production server failures we can use standby server as primary server.

>> my Primary database is 2 nodes 19C RAC database with ASM storage, OS is OEL 7.

>> we need to configure standby servers with 2 Node 19C RAC with ASM Storage, OS OEL 7 .

on standby server we need to configure the Grid infrastructure on both standby nodes, then install the oracle 19C software only on both the standby servers. remain follow below steps to enable Dataguard.


>> Primary node host details /etc/hosts

[oracle@prodnode1 admin]$ cat /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6


#Public

192.168.0.21    prodnode1.localdomain.com       prodnode1

192.168.0.22    prodnode2.localdomain.com       prodnode2

192.168.0.23    prodnode3.localdomain.com       prodnode3


#Private

192.168.1.21    prodnode1-priv.localdomain.com  prodnode1-priv

192.168.1.22    prodnode2-priv.localdomain.com  prodnode2-priv

192.168.1.23    prodnode3-priv.localdomain.com  prodnode3-priv


#VIP

192.168.0.31    prodnode1-vip.localdomain.com   prodnode1-vip

192.168.0.32    prodnode2-vip.localdomain.com   prodnode2-vip

192.168.0.33    prodnode3-vip.localdomain.com   prodnode3-vip


#prod-scan (VIP)

192.168.0.41     prod-scan.localdomain.com      prod-scan

192.168.0.42     prod-scan.localdomain.com      prod-scan

192.168.0.43     prod-scan.localdomain.com      prod-scan


>> Standby node host details /etc/hosts



>> Primary node configuration ( archive log mode, force_loggining mode should be enable)


select name,force_logging,log_mode,FLASHBACK_ON from v$database;

shut immediate

startup mount


alter database archivelog;

alter database force logging;

alter database flashback on;


Check the db_unique_name 

SQL> show parameter db_uniq


NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

db_unique_name                       string      prod


set linesize 300 pages 100

col value for a45

col name for a25

select name, value

from v$parameter

where name in ('db_name',

'db_unique_name',

'log_archive_config',

'log_archive_dest_1',

'log_archive_dest_2',

'log_archive_dest_state_1',

'log_archive_dest_state_2',

'remote_login_passwordfile',

'log_archive_format',

'log_archive_max_processes',

'fal_client',

'fal_server',

'db_file_name_convert',

'log_file_name_convert',

'standby_file_management');




Configure the standby redo logs : ( 2+1*2) 

=========================

SQL> select GROUP#,THREAD#,BYTES/1024/1024,STATUS,MEMBERS FROM V$lOG;


 



add the standby redo logs >> these will useful only when you are using max availability and max protection modes.. not in the max performance mode..

ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 group 5('+DATA/PROD/STANDBYLOGS/stdby_01.log') SIZE 200M;  etc ... add +1 extra for each thread for primary .. in your primary if you have 2 groups 4 threads for standby you need to create 2 groups with 3 threads each .

SQL> SELECT INST_ID, GROUP#,THREAD#,SEQUENCE#,ARCHIVED,STATUS FROM GV$STANDBY_LOG ORDER BY 2,1;

no rows selected

Thanks,
Srini