This post will cover everything you need to know about how to find master node in Oracle RAC. Let’s open VirtualBox and get started!
The node where Cluster Processes gets started first is called the Master Node. If the Master Node gets crashed then out of the surviving node where Cluster Processes gets started second that node will become the upcoming master node.
First, check the operational status of the nodes in an Oracle RAC cluster and then find out the master node in Oracle RAC:(From any one node)
login as: root
root@192.168.56.11's password:
Last login: Thu Jun 13 00:15:38 2024 from node2
[root@node1 ~]# ps -ef|grep pmon
grid 9528 1 0 14:06 ? 00:00:00 asm_pmon_+ASM1
oracle 11763 1 0 14:07 ? 00:00:00 ora_pmon_racdb1
root 32428 32198 0 14:45 pts/0 00:00:00 grep --color=auto pmon
[root@node1 ~]# . oraenv
ORACLE_SID = [root] ? +ASM1
The Oracle base has been set to /u01/app/grid
[root@node1 ~]# olsnodes -n -s
node1 1 Active
node2 2 Active
There are several methods to check which node is currently the master node in Oracle RAC.
Table of Contents
Method 1: Check ocssd.trc
[root@node1 ~]# grep -i 'master node' /u01/app/grid/diag/crs/node1/crs/trace/ocssd.trc |tail -1
2024-07-22 14:04:27.771 : CSSD:1569863424: [ INFO] clssgmCMReconfig: reconfiguration successful, incarnation 617123065 with 2 nodes, local node number 1, master node node1, number 1
The output indicates that node1 is the current master node.
Method 2: Check crsd.trc
[root@node1 ~]# grep -i 'master node' /u01/app/grid/diag/crs/node1/crs/trace/crsd.trc |tail -1
2024-07-22 14:05:35.151 : CRSSE:2698462976: [ INFO] {1:38317:2} Master Change Event; New Master Node ID:1 This Node's ID:1
The output indicates that node1
is the new master node.
Method 3: Check OCR Backup:
Typically, the master node is responsible for managing OCR backups.
[root@node1 ~]# ocrconfig -manualbackup
node1 2024/07/22 20:46:48 +OCRVDDG:/cluster12/OCRBACKUP/backup_20240722_204648.ocr.264.1175028409 724960844
node1 2024/07/22 20:33:35 +OCRVDDG:/cluster12/OCRBACKUP/backup_20240722_203335.ocr.263.1175027617 724960844
Here we can see the latest manual OCR backup has been taken by node1, so the master node is node1.
I hope you found this article helpful to find the master node in oracle RAC. Feel free to reach out if you have any questions.