The Master Node of RAC Cluster

The ways to find master node in Oracle RAC environment.

1) Check from ocssd.log
$ cat $GRID_HOME/log/racnode1/cssd/ocssd.l* |grep 'master node' |tail -1 2017-07-18 10:09:21.431: [ CSSD][1102125408]clssgmCMReconfig: reconfiguration successful, incarnation 217002855 with 2 nodes, local node number 2, master node number 2
2) Check from crsd.log
$ cat $GRID_HOME/log/racnode1/crsd/crsd.l* |grep 'OCR MASTER' | tail -1
2017-07-18 10:09:10.414: [ OCRMAS][1101056352]th_master:13: I AM THE NEW OCR MASTER at incar 18. Node Number 2
3) Check who ( MASTER ) does OCR backup
grid@racnode1:$ ocrconfig -showbackup

racnode2 2017/07/17 13:51:21 /u01/app/11.2.0.4/grid/cdata/RACNODE-CLUSTER/backup00.ocr
racnode2 2017/07/17 09:51:18 /u01/app/11.2.0.4/grid/cdata/RACNODE-CLUSTER/backup01.ocr
racnode2 2017/07/17 05:51:16 /u01/app/11.2.0.4/grid/cdata/RACNODE-CLUSTER/backup02.ocr
racnode2 2017/07/16 05:51:00 /u01/app/11.2.0.4/grid/cdata/RACNODE-CLUSTER/day.ocr
racnode2 2017/07/06 01:48:12 /u01/app/11.2.0.4/grid/cdata/RACNODE-CLUSTER/week.ocr
PROT-25: Manual backups for the Oracle Cluster Registry are not available

WARNING: Console code page (850) differs from Windows code page (1252)

Set the code page by entering “C:> chcp 1252”.

When trying to connect to my first PostgreSQL database, got the following warning :

C:>psql -h 192.168.78.51 -U postgres -d postgres
Password for user postgres:
psql (9.6.3)
WARNING: Console code page (850) differs from Windows code page (1252)
 8-bit characters might not work correctly. See psql reference
 page "Notes for Windows users" for details.
Type "help" for help.

Below are extracted from psql reference page “Notice for Windows users”.

Notes for Windows Users

psql is built as a "console application". Since the Windows console windows use a different encoding than the rest of the system, you must take special care when using 8-bit characters within psql. If psql detects a problematic console code page, it will warn you at startup. To change the console code page, two things are necessary:

Set the code page by entering cmd.exe /c chcp 1252. (1252 is a code page that is appropriate for German; replace it with your value.) If you are using Cygwin, you can put this command in /etc/profile.
Set the console font to Lucida Console, because the raster font does not work with the ANSI code page.

Set the code page to 1252 , and connect to server successfully.

C:>chcp 1252
Active code page: 1252

C:>psql -h 192.168.78.51 -U postgres -d postgres
Password for user postgres:
psql (9.6.3)
Type "help" for help.

postgres=#