Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to connect to remote Oracle Server through shell script.

980455Dec 18 2012 — edited Dec 18 2012
Hi, 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
This post has been answered by Dude! on Dec 18 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 15 2013
Added on Dec 18 2012
5 comments
4,801 views