How to find Master Node in Oracle RAC

本文介绍了如何在Oracle RAC环境中确定两种类型的主节点:一种是集群层面的母节点,另一种是特定资源或块级别的主节点。文章提供了查找这两种主节点的具体命令。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

How to find Master Node in Oracle RAC[@more@]How to find Master Node in Oracle RAC
I have seen many users asking how to find “Master node” in Oracle RAC, let me clear some of their doubts. 

There are two types of Masters in Oracle RAC, one is Mater node at Oracle Clusterware level and other is Master node for specific resource or block or object.

The node which gets the active state during startup is authorized to be a master node by Cluster Synchronization Service. 

Run the below command to find which node is master at Clusterware level
$cat $ORA_CRS_HOME/log/`hostname`/cssd/ocssd* |grep master
or
$ for x in `ls -tr $ORA_CRS_HOME/log/`hostname`/cssd/ocssd* `; do grep -i "master node" $x ; done | tail -1

rac2-> for x in `ls -tr ocssd* `; do grep -i "master node" $x ; done | tail -1
2014-08-03 13:56:06.891: [    CSSD][2877254544]clssgmCMReconfig: reconfiguration successful, incarnation 258992448 with 2 nodes, local node number 2, master node number 1
rac2-> 
rac1-> for x in `ls -tr ocssd* `; do grep -i "master node" $x ; done | tail -1
2014-08-03 13:56:06.449: [    CSSD][2877254544]clssgmCMReconfig: reconfiguration successful, incarnation 258992448 with 2 nodes, local node number 1, master node number 1
rac1-> 

The OCR Automatic backups are taken only by master node. If the Master fails, the OCR backups will be created on the new Master. The Master node which has OCR backups goes down due to failure then we cannot be recover the OCR that’s why Oracle recommends taking backups using “ocrconfig” and also integrating OCR backups with backup strategy. 

Run the below command to find which node is OCR Master and taking automatic backups.
$ocrconfig –showbackup
testrac02 2010/08/30 16:29:52 /oracle/crs/cdata/crs
testrac02 2010/08/30 16:29:52 /oracle/crs/cdata/crs
testrac02 2010/08/30 12:29:49 /oracle/crs/cdata/crs
testrac02 2010/08/30 08:29:46 /oracle/crs/cdata/crs
testrac02 2010/08/29 00:29:23 /oracle/crs/cdata/crs

The block level masters are used by Cache fusion while transferring the block. Any node can become the master node of a particular block and you can also see which node acting as master in V$GES_RESOURCE table (MASTER_NODE column)

You can manually remaster an object with oradebug command:
SQL> oradebug lkdebug -m pkey "object_id"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值