SQLPLUS error output....pls help...wasted all my day.
Code:
In case i enter wrong user/pswd, i want to capture error msge there it self....
Now whats happening, If I enter wrong user/pswd, it doesnt exit there....populates my file OUTPUTFILE1 with error msg and then proceeds to tabify.pl...and status that i get in EXTRACT_RETURN_CODE is that of Tabify script......
Last edited by Scott; 08-25-2010 at 05:16 AM..
Reason: Please use code tags
...
In case i enter wrong user/pswd, i want to capture error msge there it self....
Now whats happening, If I enter wrong user/pswd, it doesnt exit there....populates my file OUTPUTFILE1 with error msg and then proceeds to tabify.pl...and status that i get in EXTRACT_RETURN_CODE is that of Tabify script......
I don't really know how your long pipeline of commands works, but I believe you are facing the problem because sqlplus allows 3 login attempts by default.
If your print command prints multiple lines, the first of which has incorrect login credentials, then sqlplus will read in the second line and assume that that it's your second attempt. And so on.
You may want to use the "-L" option of sqlplus to attempt the login only once. See if the password was correct. If it was, then go ahead with your script(s).
Here's a short shell script that tests this idea -
Type in "sqlplus --help" to see all the command-line options.
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)
Hi,
Users are reporting performance issue on my Sun Solaris 10 server. I am on the server. I don't see a issue or I might be looking at the wrong thing. Please help.
I don't see anything on sar. it's all zero on that. Not sure why users are reporting high CPU and unresponsive at times. ... (1 Reply)
Hi,
I have old SCO O/S. System keeps crashing. I made lot of changes to kernel but so for nothing helped. I wrote a script which takes netstat -an output every one minute. I saw some thing right before the system crashed. Not sure if this means anything..
uname -a
SCO_SV djx2 3.2... (2 Replies)
Hi All, I have the below simple script.
It runs just fine by itself when I manually invoke it.
But once I put it in the crontab with entry:
* * * * * /users/myuser/test.ksh >> /users/myuser/log/test.txt"
It does NOT print the returned value ($REMAIN) from the DB!?
The result in the... (3 Replies)
a job extracts orcle data into unix as flat file.
a single record breaks into two record in unix flat file. This is the case only for 6 records out of 60 lack records.
(its not single record in two line. but its single record into record. ie., \n come into picture)
can you tell me what... (6 Replies)
Hi.
I need to output a 4 queries result into another application using
result=`sqlplus -s ${3}/${4}@${2} << EOF
...
query1
query2
query3
query4
....
echo "$metrics1"
and returning those individual values into another app.
(query1 and 3compute one value, query 2 and 4 compute 4... (3 Replies)
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)