Have you tested what you get using
isql -U${USER} -P${PASS} -S${SERVER}
and give those inputlines from stdin ?
Maybe ; needed in every sqlline - usually sql syntax need ;
Yes... the isql has been connecting to Database... but not executing next commands.
Code:
USER="xyz"
PASS="abc"
SERVER="SCCS"
DB="blue"
WORK_DIR="/usr/home/genesys/Sayantan/ramakrishna"
set -x
isql -U${USER} -P${PASS} -S${SERVER}<<EOF
go
sp_help NBEventLog
go
exit
EOF
Out put:
+ isql -Uxyz -Pabc -SSCCS
+ 0< /var/tmp/sh14880.1
Msg 2409, Level 11, State 2:
Cannot find the requested character set in Syscharsets: name = 'roman8'.
No conversions will be done.
I hope the isql not able recognize the EOF(stdin) in script.Please help me.
The Cannot find message are expecting in my isql.
I've never used Sybase, but any SQL engine that I've used had a limited set of commands that were recognized. I don't think it can intrepret the EOF logic. In the past I have created a temp file in the stream of the script and then executed the isql (or similar) with a directive to use a file for command input and use the temp file there. This may be a good option for you.
If you do a search on sybase and scripts, you will find many threads about it. Many of them use the EOF with no issues - the one's I've notice do NOT use an exit - that maybe what is messing with your script.