Home » Infrastructure » Unix » Sometimes getting SP2-0734 error message (shell script)
Sometimes getting SP2-0734 error message [message #643622] Wed, 14 October 2015 00:57 Go to previous message
praveenk768
Messages: 5
Registered: October 2015
Junior Member
Hi All,
Once I try to execute the below script,it will execute the script and it will generate the output file.
Sometimes,it got executed successfully and generate the output file.. sometimes,it got executed and generate the output with error message as
********************************* Top of Data **********************************
SP2-0734: unknown command beginning "PATH=/u01/..." - rest of line ignored.
SP2-0734: unknown command beginning "sqlplus -S..." - rest of line ignored.
******************************** Bottom of Data

Can anyone pls tell me why its showing this error message.

Shell script:
SQL_FILE=/ftp/otmtms/config/test.sql
#SID=OTM60APL2D
SID=OAPL2P
RUN_DATE=$(date +%Y%m%d%H%M%S)
 
function build_sql (){
tempfile=/tmp/.exec_$RUN_DATE
echo "# Set ORACLE_HOME and related variables" > $tempfile
echo "ORACLE_HOME=/u01/app/oracle/product/11.2.0; export ORACLE_HOME" >> $tempfile
echo "LD_LIBRARY_PATH=\$ORACLE_HOME/lib:\$LD_LIBRARY_PATH; export LD_LIBRARY_PATH" >> $tempfile
echo "NLS_LANG=American_America.UTF8; export NLS_LANG" >> $tempfile
echo "# Set PATH" >> $tempfile
echo "PATH=\$ORACLE_HOME/bin:\$PATH; export PATH" >> $tempfile
echo "sqlplus -S /nolog <<EOF" >> $tempfile
echo "spool /ftp/test/IVin2_OTM_$RUN_DATE.FCNA" >> $tempfile
echo " whenever sqlerror exit FAILURE" >> $tempfile
echo " connect SHIPMAXOWNER/shipmaxowner@$SID " >> $tempfile
echo " @$SQL_FILE" >> $tempfile
echo "EOF" >> $tempfile
#Execute SQL
sh $tempfile
}
build_sql
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Why oracle instance doesn't shutdwon after deleting system datafile?
Next Topic: Need small modification in shell script
Goto Forum:
  


Current Time: Fri Mar 29 05:55:06 CDT 2024