2

Where can I find Full list of all Predefined ORACLE PL/SQL Exceptions?

I have looked at that SQLCODE:-942 and SQLCODE:-02289 are exception code for sequence and table not existed. but whatever I cannot find any official document to explain the above two error code. so question is are these oracle Predefined exceptions? because I want to use the two error code to catch this two type exceptions.

C.c
  • 1,905
  • 6
  • 30
  • 47
  • This seems to be a duplicate of http://stackoverflow.com/questions/1974338/full-list-of-predefined-oracle-pl-sql-exceptions – Chetter Hummin Apr 13 '13 at 16:52
  • I don't think so. I am asking where I can find the document for SQLCODE:-942 and SQLCODE:-02289, the link you given didn't answer my question – C.c Apr 13 '13 at 16:53
  • For 2289, http://www.oracleerrorcodes.com/oracle-database-error-code-ora-02289-sequence-does-not-exist/ – Chetter Hummin Apr 13 '13 at 16:55
  • For 942, http://ora-00942.ora-code.com/ – Chetter Hummin Apr 13 '13 at 16:55
  • thanks, do you have any official document from oracle website? – C.c Apr 13 '13 at 16:57
  • 4
    http://docs.oracle.com/cd/B28359_01/server.111/b28278/toc.htm - you know you can use "site:oracle.com" in google to find stuff on specific sites? – Mat Apr 13 '13 at 17:01

3 Answers3

3

You used the term 'exceptions', but it looks like you're asking about error code values, and specifically SQLCODEs. I'll try to answer both questions. :-)

To find the pre-defined exceptions defined in the database you can look in the package SYS.STANDARD. This is where the standard exceptions, such as NO_DATA_FOUND and TOO_MANY_ROWS, are defined. This is a good place to look if you're interested in trapping a specific SQLCODE as it might save you having to define a custom exception and initializing it with PRAGMA EXCEPTION_INIT.

To find a complete list of error code values, including SQLCODEs, compiler errors, etc, you should look in the version of the Oracle Database Error Messages manual for the database version you're using. In his reply above, @Mat gives a reference to the 11.1 manual. The 11.2 manual can be found here.

Share and enjoy.

1

The closest thing I could find is a 10g PDF. The only error codes list I could find for 11g is an HTML document. It's totally weird to me that neither list includes the ORA-00942 code, although it's pretty self explanatory.

DCookie
  • 42,630
  • 11
  • 83
  • 92
-1

http://docs.oracle.com/cd/B19306_01/appdev.102/b14261.pdf , this is the Oracle database PL/SQL Language reference manual, look for predefined PL/SQL exceptions..

Zakaria Bouazza
  • 433
  • 6
  • 13