dbTalk Databases Forums  

symbolic ORA-XXXX names and classes of such

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss symbolic ORA-XXXX names and classes of such in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mh@pixar.com
 
Posts: n/a

Default symbolic ORA-XXXX names and classes of such - 06-07-2009 , 12:43 AM






I'm adding code to my application to make it TAF-aware. TAF
an excellent feature and I haven't had much problem getting
the extra error checking in place.

1. Is there some place where symbolic names for the ORA-XXXXX
codes are defined?

2. Is there some grouping or categorizing, such as "this is
the set of all ORA errors you can get on a connect and
that would benefit from a retry".


My code currently looks as per below, and I would like to
be able to remove a bit of the hardcoded numbers. I've built
up these numbers by trial and error.

Many TIA!
Mark

# connect to the database, and retry on fixable exceptions
try:
conn=cx_Oracle.connect(connstr)
except cx_Oracle.DatabaseError,e:
# ORA-01033: ORACLE initialization or shutdown in progress
# ORA-12537: TNS:connection closed
# ORA-12528: TNS:listener: all appropriate instances are blocking
# new connections
# ORA-12521: TNS:listener does not currently know of instance
# requested in connect descriptor
# ORA-12520: TNS:listener could not find available handler for
# requested type of server

if e.message.code in [1033,12537,12528,12521,12520]:
print 'RETRYING:', e.message.message.strip()
...
--
Mark Harrison
Pixar Animation Studios

Reply With Quote
  #2  
Old   
joel garry
 
Posts: n/a

Default Re: symbolic ORA-XXXX names and classes of such - 06-08-2009 , 01:04 PM






On Jun 6, 10:43*pm, m... (AT) pixar (DOT) com wrote:
Quote:
I'm adding code to my application to make it TAF-aware. *TAF
an excellent feature and I haven't had much problem getting
the extra error checking in place.

1. *Is there some place where symbolic names for the ORA-XXXXX
* * codes are defined?

2. *Is there some grouping or categorizing, such as "this is
* * the set of all ORA errors you can get on a connect and
* * that would benefit from a retry".

My code currently looks as per below, and I would like to
be able to remove a bit of the hardcoded numbers. *I've built
up these numbers by trial and error.

Many TIA!
Mark

* * # connect to the database, and retry on fixable exceptions
* * try:
* * * * conn=cx_Oracle.connect(connstr)
* * except cx_Oracle.DatabaseError,e:
* * * * # ORA-01033: ORACLE initialization or shutdown in progress
* * * * # ORA-12537: TNS:connection closed
* * * * # ORA-12528: TNS:listener: all appropriate instances are blocking
* * * * # * * * * * *new connections
* * * * # ORA-12521: TNS:listener does not currently know of instance
* * * * # * * * * * *requested in connect descriptor
* * * * # ORA-12520: TNS:listener could not find available handler for
* * * * # * * * * * *requested type of server

* * * * if e.message.code in [1033,12537,12528,12521,12520]:
* * * * * * print 'RETRYING:', e.message.message.strip()
* * * * * * ...
--
Mark Harrison
Pixar Animation Studios
find $ORACLE_HOME -name *msg

You will find many more messages than you could ever possibly deal
with, since Oracle has been building them up for decades. The
oraus.msg is perhaps what you want to peruse, maybe something in $OH/
network/mesg. Couldn't begin to answer the second question, besides
suggesting empirical research.

Metalink and some other web sites like http://www.ora-error.com/ have
the generic definitions also. Metalink may have some troubleshooting
type docs, search for troubleshooting taf, troubleshooting sql
oracle~net, etc. There's just so many obscure things that rarely
happen...

jg
--
@home.com is bogus.
http://ultraviolet.org/blog/2009/04/01/spam-from-space

Reply With Quote
  #3  
Old   
mh@pixar.com
 
Posts: n/a

Default Re: symbolic ORA-XXXX names and classes of such - 06-09-2009 , 01:05 PM



joel garry <joel-garry (AT) home (DOT) com> wrote:
Quote:
find $ORACLE_HOME -name *msg
Ah, this is great... thanks!


Quote:
Metalink and some other web sites like http://www.ora-error.com/ have
the generic definitions also. Metalink may have some troubleshooting
type docs, search for troubleshooting taf, troubleshooting sql
oracle~net, etc. There's just so many obscure things that rarely
happen...
Well here's my contribution to the state of the art:

These are the various connection errors I'm able to reproduce
while bouncing nodes and bringing instances in and out of
service, and that are worth retrying. This is in contrast to
errors such as "ORA-01017: invalid username/password", which
will probably not be fixed by sleeping and retrying but should
be directed to a human being for checking.

# ORA-01033: ORACLE initialization or shutdown in progress
# ORA-12537: TNS:connection closed
# ORA-12528: TNS:listener: all appropriate instances are blocking
# ORA-12521: TNS:listener does not currently know of instance
# ORA-12520: TNS:listener could not find available handler for

Thanks!
Mark

--
Mark Harrison
Pixar Animation Studios

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.