SQLPLUS error


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting SQLPLUS error
# 1  
Old 06-11-2007
SQLPLUS error

I am running a script that invokes SQLPLUS. During the execution I get the following:

Code:
SQL*Plus: Release 9.2.0.8.0 - Production on Mon Jun 11 16:12:50 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production

SQL>   2    3    4    5    6    7    8

Does anyone know where the 2..8 is coming from?

Code:
if [ $retcode -eq "0" ]; then
	print
	print "*******************************************************" 
  print "2) Updating records in SKU table"
  print "*******************************************************" 
	sqlplus $db_usr_stsc<<EOF
UPDATE stsc.sku s
SET (s.p_abc, s.p_manualparameters, s.p_commenttext, s.p_workinglistname) =
(SELECT x.p_abc, x.p_manualparameters, x.p_commenttext, x.p_workinglistname
      	       FROM pac.SKUUPDATE x
        	    WHERE s.loc = x.loc AND s.item = x.item)
 	WHERE EXISTS (SELECT 1
  	              FROM pac.SKUUPDATE x
    	           WHERE s.loc = x.loc AND s.item = x.item);
COMMIT;
exit
EOF
echo "Update Complete"
fi

# 2  
Old 06-11-2007
From the various end of lines in your update statement.

In SQLPLUS the prompt is "SQL>" then when you don't finish the statement with a ";" it assumes this is a continuation of the previous line and prompts with a number.
# 3  
Old 06-12-2007
sqlplus -s
# 4  
Old 07-22-2008
Hi , try with '/' at the end of script.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

SQLoader & SQLplus error ?

Hi experts, I have got the following errors when running my sqloader script : Can anyone give me a hand ? ERROR: ORA-12154: TNS:could not resolve the connect identifier specified SP2-0306: Invalid option. Usage: CONN ] where <logon> ::= <username> <proxy> ::= <proxyuser>... (14 Replies)
Discussion started by: Jaewong
14 Replies

2. Shell Programming and Scripting

Sqlplus error - sqlplus -s <login/password@dbname> : No such file or directory

i am using bash shell Whenever i declare an array, and then using sqlplus, i am getting sqlplus error and return code 127. IFS="," declare -a Arr=($Variable1); SQLPLUS=sqlplus -s "${DBUSER}"/"${DBPASS}"@"${DBASE} echo "set head off ; " > ${SQLCMD} echo "set PAGESIZE 0 ;" >> ${SQLCMD}... (6 Replies)
Discussion started by: arghadeep adity
6 Replies

3. Shell Programming and Scripting

Error with nested if within an sqlplus task inside

Hi ALL, I am receving a "strange" error using a nested if within an sql operation inside: ./dom.ksh: syntax error at line 80 : `then' unmatched This is all my script code: in bold the step receiving the error. Any help would really aprrecieted ......! **** I have tried all the... (2 Replies)
Discussion started by: AndreaCecco
2 Replies

4. Red Hat

TNS Timeout Error when connecting to SQLPLUS through scripts only

Hi, I am facing a strange issue when connecting to SQLPLUS via a shell scripts. I am using Linux 2.6.18-274.18.1 and gbash shell. When I connect to SQLPLUS through scripts then it throws TNS Time Out error ""sometimes"" and connects successfully other times.This is only happening when... (9 Replies)
Discussion started by: aashish.sharma8
9 Replies

5. Shell Programming and Scripting

SQLPLUS Error Capturing

This is my .sh file sqlplus -s my_user/my_pswd@mydb @my_sql.sql ret_code=$? if then echo "return code is $ret_code " echo "Failed" else echo "return code is $ret_code " echo "Success" fi ===================================================== and my_sql.sql is whenever... (4 Replies)
Discussion started by: emailsafath2011
4 Replies

6. Shell Programming and Scripting

SQLPLUS error output....pls help...wasted all my day.

Code: print "$DB_CONNECT\n@$SQLDIR/SQLFILE.sql $INPUT" | sqlplus -s 2>> $LOGFILE | tee $IDW_HOME/data/supp/OUTPUTFILE1.dat | $PL_HOME/tabify_465.p > $IDW_HOME/data/supp/OUTPUTFILE2.txt 2>> $LOGFILE EXTRACT_RETURN_CODE=$? if then echo "EXTRACT or Tabify FALIED" >> $LOGFILE exit... (2 Replies)
Discussion started by: knarula
2 Replies

7. Shell Programming and Scripting

sqlplus error output to different error log file

HELLO, I am using such a command to write oracle sqlplus query result to text file: sqlplus -S xxx/xxx@xxxxxxx @\tmp\2.sql>\tmp\123.txt Is it possible to script that: If command succesfull write in \tmp\log.txt: timestamp and "succeded" and create 123.txt with results else If error... (2 Replies)
Discussion started by: tomasba
2 Replies

8. Shell Programming and Scripting

error running sqlplus from shell file

I am running a shell file following script on bash shell in solaris 10 ( echo abc@orcl echo abc echo "set feedback off" echo "truncate table SIndexDataTypeHst1_changes;" ) | sqlplus -s but getting the following error ERROR: ORA-01005: null password given; logon denied ... (3 Replies)
Discussion started by: mmunir
3 Replies

9. UNIX for Dummies Questions & Answers

error connecting to sqlplus

Hi, I wrote a shell script to call oracle procedure. But when i am trying to connet sqlplus with the fallowing statement It is giving me error " callproce.sh : sqlplus: not found". What could be the problem. sqlplus -s $CONNECT_STRING >$LOGFILE <<!! thank u all papachi (2 Replies)
Discussion started by: papachi
2 Replies

10. Shell Programming and Scripting

sqlplus -s error capture

Hi folks a wee problem that requires some help. I am writing a script that allows me to automate the changing of a password in sqlplus the problem i encounter is that the code contains a case statement that allows the helpdesk to select whether to allow or deny access by switching the... (1 Reply)
Discussion started by: w33man
1 Replies
Login or Register to Ask a Question