Hi all,
I need a shell script which runs a sql script but I couldn't find how to finish it. This is the code that I have:
#! /usr/bin/ksh
export SHELL=/bin/ksh
export ORACLE_SID=database
export ORACLE_HOME=/opt/oracle/product/9.2.0.8
sqlplus user[/password][@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=database)(PORT=1637))(CONNECT_DATA=(SERVICE_NAME=database )))] [AS {SYSOPER}] <<EOF @/path/path/path/scriptname.sql
EXIT
EOF
When I run this code I am receiving the next message error:
Usage: SQLPLUS [ [<option>] [<logon>] [<start>] ]
where <option> ::= -H | -V | [ [-L] [-M <o>] [-R <n>] [-S] ]
<logon> ::= <username>[/<password>][@<connect_string>] | / | /NOLOG
<start> ::= @<URI>|<filename>[.<ext>] [<parameter> ...]
"-H" displays the SQL*Plus version banner and usage syntax
"-V" displays the SQL*Plus version banner
"-L" attempts log on just once
"-M <o>" uses HTML markup options <o>
"-R <n>" uses restricted mode <n>
"-S" uses silent mode
Any idea what I should change?
Thank you!