sqlplus: query takes too much time [message #306525] |
Fri, 14 March 2008 10:05 |
viko
Messages: 9 Registered: March 2008
|
Junior Member |
|
|
Hi there
I've a query inside a shell script. Sometimes it takes much time to retrieve the results from one of the tables, and i think because of that much time, script just continues without that fields.
first of all, i wonder if that's possible, then I wonder if it has a solution.
i'm really stuck with this.
thanks
regards
VIKKKKO
|
|
|
|
|
|
Re: sqlplus: query takes too much time [message #306790 is a reply to message #306525] |
Sun, 16 March 2008 20:20 |
gamyers
Messages: 3 Registered: October 2007 Location: Sydney, Aus
|
Junior Member |
|
|
"i think because of that much time, script just continues without that fields."
It is possible that a very long-running query errors (eg can't find undo or insufficient temp space). If the script uses SQL*Plus then the response to an error is, by default, to continue. WHENEVER SQLERROR EXIT 1 can be used to abort instead.
Then it is up to your script to check whether the SQL*Plus called returned successfully or not. if you don't check for it, then you'll probably continue.
The solution for those issues is proper exception handling throughout the code.
|
|
|