How to connect to remote Oracle Server through shell script.
980455Dec 18 2012 — edited Dec 18 2012Hi, I am new to Shell scripting. I am trying to connect to remote oracle system, but i am getting Sqlplus not found error. i have sqlplus executable inside bin under oracle home but still i am getting the same error. can any one guide me to get this thing done.
export ORACLE_HOME=/opt/oracle/oracle11g/product/11.2.0
export NLS_LANG=American_America.US7ASCII
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export ORACLE_PATH=$ORACLE_HOME/bin
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus -s /NOLOG <<EOF
connect wcadmin/wcadmin@Oracle1.com:1521/wctest98
select * from dual;
exit
EOF