Moin,
I think, you use the
here document in a wrong syntax. Try it this way (untested, I have no Oracle on my machine here):
Code:
( sqlplus/nolog <<EOF
connect sys/ski4now as sysdba
SET LINESIZE 100
SET PAGESIZE 50
SET heading off feedback off verify off
shutdown immediate
exit
EOF
echo "$db database closes normal"
) >$BASE_DIR/dblog/db.log
The
echo is not a
sqlplus command, you should place it outside the
here document, the command sequence should start with "<<", not "<" and an output redirection IMHO does not work when starting such a document. Use a subshell (the braces) to redirect output.
Jan
EDIT: The output redirection is also possible without a subshell:
Code:
sqlplus/nolog >$BASE_DIR/dblog/db.log <<EOF
connect sys/ski4now as sysdba
SET LINESIZE 100
SET PAGESIZE 50
SET heading off feedback off verify off
shutdown immediate
exit
EOF
echo "$db database closes normal" >>$BASE_DIR/dblog/db.log