Update the linux .bashrc_profile to add ORACLE

Sunday, April 15, 2018

Update the linux .bashrc_profile to add ORACLE




Certain Linux machines won't have ORACLE profile set globally for all users, So if you need to invoke oracle command line commands like tnsping from command line without navigating to ORACLE installation directory then you have to do the following.

  • Go to your home directory and update ".bashrc_profile" to add the following 

# oracle profile
if [ -f $HOME/.oracle ] ; then
     . $HOME/.oracle
fi

  • Go to your home directory and add a new file ".oracle" with below contents, The ORACLE_HOME will change based on your oracle installation directory and oracle version.


# oracle home path
export ORACLE_HOME=/opt/oracle/client/product/12.1.0/64bit_client
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
CLASSPATH=.:$ORACLE_HOME/jdbc/lib/classes12.zip:$ORACLE_HOME/jdbc/lib/nls_charset12.zip
export CLASSPATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH

Error 404

The page you were looking for, could not be found. You may have typed the address incorrectly or you may have used an outdated link.

Go to Homepage