Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Processing SQL (pro*c) errors: connection failures etc.

Processing SQL (pro*c) errors: connection failures etc.

From: Ken Tough <ken_at_objectech.co.uk>
Date: Sun, 13 Jun 1999 15:08:58 +0100
Message-ID: <5BZtMJA6t7Y3EwzW@objectech.co.uk>

We've got a multi-threaded process which uses pro*c for doing queries in each thread. Those threads do an EXEC SQL CONNECT, and remain connected to the database throughout the life of the process.

If the connection to the server goes down for some reason, it will generally result in an sql error (through the sqlca). Question is, how can we tell what errors are related to a server-connection faults, and which are due to transaction or data problems?

At the mo, we just use a function that checks whether the sqlcode value is in one of several ranges as being connection faults, derived mainly from rdbms/mesg/oraus.msg file. Is that really the only way to do it? The allocation of error numbers (I realise it's a "defacto standard") seems to be a dictionary definition of
"ad hoc". There aren't classes or categories of errors, just
"parse errors: 10-75, continued at 1710-1899" or some such.

Is there a better way for our threads to determine they need to re-connect to the database? If the server is shutdown and brought back up, there is one or two "internal fault: please report" errors that happen, which we handle by restarting our process.

I suppose handling must be better with OCI, but originally thought there were some better portability issues in using ESQL. (Not really the case, I guess).

--
Ken Tough Received on Sun Jun 13 1999 - 09:08:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US