• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Find OCR Master Node

by admin

Function of OCR Master Node

OCR master is in charge of OCR update and is the only one that’s allowed to update, the post shows a way to find OCR master.

1. The default OCR master is always the first node that’s started in the cluster.

2. When OCR master (crsd.bin process) stops or restarts for whatever reason, the crsd.bin on surviving node with lowest node number will become new OCR master.

Finding OCR Master Node

The following method can be used to find OCR master:

1. By searching crsd.l* on all nodes:

grep "OCR MASTER" $ORA_CRS_HOME/log/$HOST/crsd/crsd.l*

crsd.l01:2019-01-05 15:20:26.066: [  OCRMAS][1118370112]th_master: NEW OCR MASTER IS 1
crsd.l01:2019-01-11 09:35:41.843: [  OCRMAS][1113958720]th_master: NEW OCR MASTER IS 1
crsd.log:2019-01-26 09:27:56.960: [  OCRMAS][1119611200]th_master: NEW OCR MASTER IS 1
crsd.log:2019-01-26 15:07:27.486: [  OCRMAS][1119611200]th_master:13: I AM THE NEW OCR MASTER at incar 4. Node Number 2
crsd.log:2019-01-26 15:21:03.347: [  OCRMAS][1125996864]th_master: NEW OCR MASTER IS 1
crsd.log:2019-01-26 15:21:13.411: [  OCRMAS][1125996864]th_master:13: I AM THE NEW OCR MASTER at incar 8. Node Number 2

If there’s output, the last line will show who is OCR master. If the cluster has been up and running on all nodes for a long while, as crsd.log keeps rotating to crsd.l01, and crsd.l01 to crsd.l02 till crsd.l10, there’s a chance the above grep command will not return anything. If that’s the case, see Step 2.

2. By locating automatic OCR backup:

# ocrconfig -showbackup
racnode1     2019/01/26 14:24:02     /ocrsh/cdata/gbrac/backup00.ocr
racnode1     2019/01/26 10:24:01     /ocrsh/cdata/gbrac/backup01.ocr
racnode1     2019/01/26 06:24:00     /ocrsh/cdata/gbrac/backup02.ocr
racnode1     2019/01/25 02:23:49     /ocrsh/cdata/gbrac/day.ocr
racnode1     2019/01/19 02:22:57     /ocrsh/cdata/gbrac/week.ocr

OCR automatic backup is done by OCR master every 4 hours. In above example, latest automatic backup was done around 2019/01/26 14:24:02 by racnode1 which means racnode1 was and may still be OCR master since 2019/01/26 14:24:02.

Filed Under: oracle, Oracle 11g, oracle 12c, RAC

Some more articles you might also be interested in …

  1. How to Clone PDB With Oracle Key Vault (OKV)
  2. Dynamic Oracle Net Server Tracing
  3. How to Change default Oracle database listener port (1521)
  4. How to determine the required archivelog files needed for a guaranteed restore point before running flashback database
  5. How to Clone a Pluggable Database from an RMAN Container Database Backup
  6. How to Disable Oracle Net Tracing without stopping server process
  7. Beginners Guide to Oracle Database In-Memory in RAC
  8. How To Disable Advanced Analytics in Oracle Database 12c?
  9. Oracle RMAN : Block-Level Media Recovery (Basics and Example)
  10. How to Verify if a Disk/Partition is in Use by Oracle ASM, was used by Oracle ASM or is never used by Oracle ASM

You May Also Like

Primary Sidebar

Recent Posts

  • “aws s3 mv” Command Examples
  • “aws s3 mb” Command Examples
  • “aws s3 ls” Command Examples
  • “aws s3 cp” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright