Wednesday, May 30, 2012

Check which Binary Options are Installed

Oracle binary get linked with many of the database options.
RAC - Real Application Cluster
RAT - Real Application Testing
OLS - Oracle Label Security
DV - Database Vault
ASM - Automated Storage Management
OLAP - Oracle OLAP
PART - Oracle Partitioning
CTX - Context Management Text

Following script could be used to find out which options are already relinked with Oracle binary. (It is assumed ORACLE_HOME is set)
component=(RAC RAT OLS DV ASM OLAP PART CTX)
compfile=(kcsm.o  kecwr.o kzlilbac.o  kzvidv.o kfon.o xsyeolap.o kkpoban.o kciwcx.o)
i=0
for comp in ${component[@]}
  do
    x=`ar -t $ORACLE_HOME/rdbms/lib/libknlopt.a | grep -c ${compfile[i]}`
    if [[ "$x" == "0" ]]; then
      printf "%-15s %s \033[31m %8s \033[0m %2s\n" "$comp" "[" "NOT INSTALLED" "]"
    else
      printf "%-15s %s \033[32m %11s \033[0m %4s\n" "$comp" "["   "INSTALLED"   "]"
    fi
    let "i++"
  done

RAC             [  NOT INSTALLED   ]
RAT             [    INSTALLED     ]
OLS             [  NOT INSTALLED   ]
DV              [  NOT INSTALLED   ]
ASM             [  NOT INSTALLED   ]
OLAP            [    INSTALLED     ]
PART            [    INSTALLED     ]
CTX             [    INSTALLED     ]
More on metalink note
How to Check and Enable/Disable Oracle Binary Options [ID 948061.1]
How to Check Whether Oracle Binary/Instance is RAC Enabled and Relink Oracle Binary in RAC [ID 284785.1]