Recognize Oracle Client installation


On my environment script I want to recognize if an ORACLE_HOME belongs to a database or is just a client installation. Oracle does the following in its Oracle 26ai client runInstaller:

...
ORACLE_SERVER_PATH="${ORACLE_HOME}/inventory/Components21/oracle.server";
ORACLE_GSM_PATH="${ORACLE_HOME}/inventory/Components21/oracle.dslm";
# Check if the directory oracle.server exists
# If it exists, then the product is db otherwise is client
if [ -d $ORACLE_SERVER_PATH ]; then
...
  ${ORACLE_HOME}/perl/bin/perl -I${ORACLE_HOME}/perl/lib -I${ORACLE_HOME}/bin ${ORACLE_HOME}/bin/dbSetup.pl -J-D${CVU_OS_SETTINGS} "$@"   # bug 33519960 - support paths with whitespaces
else
  if [ -d $ORACLE_GSM_PATH ]; then
    ${ORACLE_HOME}/perl/bin/perl -I${ORACLE_HOME}/perl/lib -I${ORACLE_HOME}/bin ${ORACLE_HOME}/bin/dbSetup.pl "$@"      # bug 33519960 - support paths with whitespaces
  else
    ${ORACLE_HOME}/perl/bin/perl -I${ORACLE_HOME}/perl/lib -I${ORACLE_HOME}/bin ${ORACLE_HOME}/bin/clientSetup.pl "$@"      # bug 33519960 - support paths with whitespaces
  fi
fi

Basically here the logic:

  • Directory ${ORACLE_HOME}/inventory/Components21/oracle.server exists ➡️ Oracle Database installation
  • Directory ${ORACLE_HOME}/inventory/Components21/oracle.dslm exists ➡️ Global Data Services installation

On my script I simplified by checking:

  • File ${ORACLE_HOME}/bin/clientSetup.pl exists ➡️ Oracle Full client installation

Otherwise is a DB installation, as I don’t expect to use my script in any GDS server.

Leave a comment

Your email address will not be published. Required fields are marked *