Wednesday, March 22, 2017

How to Check Whether Oracle Binary/Instance is RAC Enabled

To check whether Oracle binary is RAC enabled


On Linux/UNIX except AIX:

  ar -t $ORACLE_HOME/rdbms/lib/libknlopt.a|grep kcsm.o


  ar -X32_64 -t $ORACLE_HOME/rdbms/lib/libknlopt.a|grep kcsm.o

If above command does not return anything, RAC option is not linked in. A RAC enabled oracle binary should return "kcsm.o".

Example :-

[oracle@rac2 ~]$ ar -t $ORACLE_HOME/rdbms/lib/libknlopt.a|grep kcsm.o

To check whether a running instance is a RAC instance

There can be multiple ways for this, some of listed as below :-

1. Check sqlplus banner:-

[oracle@rac2 ~]$ $ORACLE_HOME/bin/sqlplus / as sysdba

SQL*Plus: Release Production on Wed Mar 22 06:16:12 2017
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options


A RAC instance will show "Real Application Clusters" option in the banner.

2. Check whether lmon background process exists for the instance

[oracle@rac2 ~]$ ps -ef| grep lmon | grep orcl
oracle    5993     1  0 06:12 ?        00:00:00 ora_lmon_orcl2

Only RAC instance has lmon background process.

3. Check cluster_database parameter

SYS@orcl2>show parameter cluster_database

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
cluster_database                              boolean     TRUE
cluster_database_instances               integer       2

Output "true" means it's RAC instance but this is not reliable as a RAC instance may have cluster_database set to false during maintenance.

No comments:

Post a Comment