Sometimes getting SP2-0734 error message


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Sometimes getting SP2-0734 error message
# 1  
Old 10-14-2015
Sometimes getting SP2-0734 error message

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
Code:
********************************* 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:
Code:
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


Last edited by vbe; 10-14-2015 at 05:06 AM.. Reason: code tags
# 2  
Old 10-14-2015
Sounds like it's running intermittendly, so more context is needed. Are those SQL error msgs? Please post the entire output, contents of variables, tempfile contents...
# 3  
Old 10-14-2015
Thanks Rudic for helping me on this.
I am new to shell script. I will explain you my understanding

1.We placed this shell script in the server. we schedule to run this script daily as cron job.

2.Once the shell scripts runs , I guess it will call test.sql sql file(in the script:SQL_FILE=/ftp/otmtms/config/test.sql) and it will generate the output file
->IVin2_OTM_$RUN_DATE.FCNA(in the script:spool /ftp/test/IVin2_OTM_$RUN_DATE.FCNA) and place it server.
3.lets say, on monday script got executed and placed the file in server WITHOUT ANY ERROR MESSAGE. Next day(tuesday),it got executed and placed the file in the server WITH ERROR MESSAGE.
4.I guess, if there any issue in the script, it supposed to generate the output file with error message on everyday right? But I am getting an error message on alternative days . I guess

can you please provide your feedback on this.
# 4  
Old 10-14-2015
I can't guess. You didn't provide the data requested. You'll need to compare the environments of the two processes to find out what causes the error.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Fedora

Install memcached on Suse 11 SP2

hi guys I am trying to install this extension for php named memcached but I am not really able to do it PECL :: Package :: memcached I have Suse 11 SP2 installed without any registration (I mean installed not paying subscription) so my question is there a way to install it like in... (0 Replies)
Discussion started by: karlochacon
0 Replies

2. Shell Programming and Scripting

SP2-0642 error while executing procedure from shell script

hi all, i have a unix script where i am calling a database procedure from it. while executing the procedure i am getting an error: but when i tried to call the same procedure manually then it ran successfully, i goggled this issue and found timezone.dat file missing at... (0 Replies)
Discussion started by: lovelysethii
0 Replies

3. UNIX for Dummies Questions & Answers

Suse 10 SP2 VNC Password

hi guys I've configured some CentOS where you can set a password for VNC and that password is requested before connecting to the normal user login But I found that Suse 10 SP3 has no such thing basically it has this configuration under /etc/xinetd.d/vnc service vnc1 { ... (2 Replies)
Discussion started by: kopper
2 Replies

4. HP-UX

'SP2-0734: unknown command beginning "elect' Error

My environment is HP-UX... NIS CEL | uname -a HP-UX s53kj113 B.11.11 U 9000/800 1510201964 unlimited-user license I ran this command directly from the server's sqllplus. Logically, it should have work. But in my case, it always escaped the 1st character of the next command after the... (3 Replies)
Discussion started by: aimy
3 Replies

5. UNIX for Dummies Questions & Answers

Where are the repositories located in SUSE SLES 10 SP2

Hi, In SUSE SLES 10 SP2 where are the software repositories located? In CENTOS they are in /etc/yum.repositories or something like that. What does SLES use? (1 Reply)
Discussion started by: mojoman
1 Replies

6. UNIX for Dummies Questions & Answers

How to install Cygwin on Windows XP SP2

Please can anyone help me with how to install cygwin on a windows Xp SP2 platform, I cant seem to get it to work? (1 Reply)
Discussion started by: jimoney
1 Replies

7. Solaris

Solaris 10 dualboot with Win Xp sp2 ....Plz help !!!!!

Hi All , I am new to solaris & i would like to explore it to taste a flavour of Unix. Before I installed I did a lot of googling as I did not want to play with the data i have on win XP & finally installed Solaris in a dual mode option along with Win XP. These are the steps i... (1 Reply)
Discussion started by: codewarrior
1 Replies

8. Gentoo

Squid 2.6STABLE1 and IE6 SP2

I have a very short period of time in which to set up a proxy server for about 800 Windows boxes that "have to" use IE5 or IE6. I decided to try Squid since it seems to be the most popular proxy out there and it supports SSL/https proxying. I tested quiet a few things the past few days and... (2 Replies)
Discussion started by: deckard
2 Replies
Login or Register to Ask a Question