Connecting to remote Oracle server through shell script Connecting to remote Oracle server through shell script unix unix

Connecting to remote Oracle server through shell script


Your ORACLE_HOME (below) looks incorrect to me. It should not contain the host and port of your oracle server.

ORACLE_HOME=Oracle1.com:1521/opt/oracle/oracle11g/product/11.2.0/bin;

ORACLE_HOME is the path to wherever you have installed the Oracle client on the local machine. For example, it might be:

ORACLE_HOME=/opt/oracle/oracle11g/product/11.2.0

Check if you have the sqplus executable in ${ORACLE_HOME}/bin.


It seems like sqlplus is not on your PATH variable.

You can see if it is with

which sqlplus

And find where it is with

locate sqlplus

To add something to your path

export PATH=$PATH:/path/to/sqlplusdir/