Monday 30 September 2024

How to Create Oracle 19C Dataguard Primary and Physical Standby Database step by step process part 1

 Dear All,

In this post i will show you how to Create Oracle 19C Dataguard Primary and Physical Standby Database configuration step by step Process.

Part 1 :  Oracle 19C database install and configurate (primary node setup)

Part 2 : Oracle 19C database install (standby server setup)

Part 3 : Data guard configuration (Both primary and physical standby configuration) ( part 3 check next post )

Ø  Primary side configuration steps

Ø  Standby server side configuration steps

Ø  DG configuration.


Pre-requisites: configure the primary database with 19C db and install the standby database server with 19C software.

I am using below configuration and directories in this lab


Primary database server details :

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

Host Name: primary.localdomain

ORACLE_SID      : rprod  

DB_UNIQUE_NAME=rprod

DB Name : RPROD

ORACLE_HOME: /u01/app/oracle/product/19.0.0/db_home


Standby database server details :

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

Host Name: standby.localdomain / 

ORACLE_SID      : stby

DB_UNIQUE_NAME=stby

DB Name : RPROD

ORACLE_HOME: /u01/app/oracle/product/19.0.0/db_home


 cat /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6


192.168.0.111   primary.localdomain     primary

192.168.0.122   standby.localdomain     standby


Part 1 :  Oracle 19C database install and configurate (primary node setup)

> create required directories .



download and unzip the oracle 19c software's as showed below .

cd /media/sf_VM_Softwares/19C_DB_Linux_7.8.9-SW/19C_Database/

unzip V982063-01.zip -d /u01/app/oracle/product/19.0.0/db_home



Install the pre-requisite RPM;s 

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

yum list oracle*

yum install -y oracle* --skip-broken

yum install -y oracle-database-preinstall-19c  ( it will create oracle os  user with groups )



disable selinux permission 

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

/etc/selinux/config

SELINUX=permissive / disbaled 



stop and disable firewall:

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

systemctl stop firewalld

systemctl disable firewalld



Install the database software:  

 > connect to oracle os user and go to oracle home location then install the database software .


[root@primary 19C_Database]# id oracle

uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)

[root@primary 19C_Database]#

[oracle@primary ~]$ cd /u01/app/oracle/product/19.0.0/db_home/
[oracle@primary db_home]$ pwd
/u01/app/oracle/product/19.0.0/db_home
[oracle@primary db_home]$ ls
addnode     css     deinstall    env.ora        javavm  md       OPatch   oui      R            root.sh.old.1  sqlj      usm
apex        ctx     demo         has            jdbc    mgw      opmn     owm      racg         runInstaller   sqlpatch  utl
assistants  cv      diagnostics  hs             jdk     network  oracore  perl     rdbms        schagent.conf  sqlplus   wwg
bin         data    dmu          install        jlib    nls      ord      plsql    relnotes     sdk            srvm      xdk
clone       dbjava  drdaas       instantclient  ldap    odbc     ords     precomp  root.sh      slax           suptools
crs         dbs     dv           inventory      lib     olap     oss      QOpatch  root.sh.old  sqldeveloper   ucp
[oracle@primary db_home]$ ./runInstaller



select software only .. we can configure database later by using dbca..


click next 




select enterprise 





click next 



chose as per your requirement



next 


next




click on install 






run the script from root user .. click next 


click ok// that conclude database 19C software installation part .

 


Start oracle 19C database configuration with GUI mode using dbca tool/ utility 


[oracle@primary db_home]$ pwd

/u01/app/oracle/product/19.0.0/db_home

[oracle@primary db_home]$ ./runInstaller

Launching Oracle Database Setup Wizard...


The response file for this session can be found at:

 /u01/app/oracle/product/19.0.0/db_home/install/response/db_2024-09-30_02-07-57PM.rsp


You can find the log of this install session at:

 /u01/app/oraInventory/logs/InstallActions2024-09-30_02-07-57PM/installActions2024-09-30_02-07-57PM.log

[oracle@primary db_home]$

>> start database configuration using dbca

cd /u01/app/oracle/product/19.0.0/db_home/bin

./dbca



next .. select advance configuration option 

next 


next 



next 


next 


next 




next



next




next 


next


next

next 







>> primary database server configuration completed.

[oracle@primary bin]$ ps -ef |grep smon

oracle   22085     1  0 14:31 ?        00:00:00 ora_smon_rprod

oracle   22516 12615  0 14:34 pts/0    00:00:00 grep --color=auto smon

[oracle@primary bin]$ date

Mon Sep 30 14:34:36 EDT 2024

[oracle@primary bin]$


Part 2 : Configure oracle Dataguard standby server  (standby server setup)

> create directories same as primary server 


[root@standby ~]# mkdir -p /u01/app/oracle/product/19.0.0/db_home

[root@standby ~]# mkdir -p /u01/Backup

[root@standby ~]# mkdir -p /u01/app/oraInventory

[root@standby ~]#

[root@standby ~]# chmod -Rf 755 /u01

[root@standby ~]# chown -Rf oracle:oinstall /u01



Install the RPM's for 19C database , disable firewall and disbale the selinux configuration ... check above for these commands ..

root@standby ~]# yum list oracle*
Loaded plugins: langpacks, ulninfo
Installed Packages
oracle-database-preinstall-18c.x86_64                                    1.0-1.el7                                   @ol7_latest
oracle-database-preinstall-19c.x86_64                                    1.0-3.el7                                   @ol7_latest
oracle-database-preinstall-21c.x86_64                                    1.0-1.el7                                   @ol7_latest
oracle-database-server-12cR2-preinstall.x86_64                           1.0-5.el7                                   @ol7_latest

> systemctl stop / disable firewalld 
> cat /etc/selinux/config  ( disable )  SELINUX=disabled
 [root@standby ~]# systemctl disable firewalld.service
[root@standby ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)
[root@standby ~]#



cd /u01/app/oracle/product/19.0.0/db_home
./runInstaller


[root@standby db_home]# /u01/app/oracle/product/19.0.0/db_home/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/19.0.0/db_home

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Oracle Trace File Analyzer (TFA - Standalone Mode) is available at :
    /u01/app/oracle/product/19.0.0/db_home/bin/tfactl

Note :
1. tfactl will use TFA Service if that service is running and user has been granted access
2. tfactl will configure TFA Standalone Mode only if user has no access to TFA Service or TFA is not installed

[root@standby db_home]#



standby server installation completed . here ends the part 2 


Check the next post for part 3 ...  


Thanks,

Srini
















No comments:

Post a Comment


No one has ever become poor by giving