Oracle error codes

Hello,
My application is handling exceptions like this:
try{
resultSet = pStatement.executeQuery();
catch(SQLException e){
conn.close();
if(e.getErrorCode() == 942)
// handle with table or view doesn't exist
else
// handle with other errors
Is there a way to not hard code the error codes?
Is there any java constants to oracle error or messages in the jdbc driver?
Thanks,
Vladimir.

<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Marcus Uddenhed ([email protected]):
I need to know where i can find,
a description to the error codes
in Oracle.<HR></BLOCKQUOTE>
null

Similar Messages

  • Is there a listing or book of oracle error codes?

    i am looking for a book of oracle error codes. Is there someplae where I can find them online or anywhere really.
    thanks

    See the following URL gives you a list of oracle messages and actions to be done
    http://ora-doc.cict.fr:7777/server.815/a67785/toc.htm

  • Error in OBIEE:Oracle Error code: 1445

    When making some formula or adding new columns,I am getting the following Err..
    State: HY000. Code: 10058. NQODBC SQL_STATE: HY000 nQSError: 10058 A general error has occurred. nQSError: 17001 Oracle Error code: 1445, message: ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table at OCI call OCIStmtExecute. nQSError: 17010 SQL statement preparation failed. (HY000)
    Its something related to joins.Can anyone Help.
    Edited by: Darwin S on Aug 22, 2009 8:48 PM

    ORA-01445: cannot select ROWID from a join view without a key-preserved table
    Cause: A SELECT statement attempted to select ROWIDs from a view derived from a join operation. Because the rows selected in the view do not correspond to underlying physical records, no ROWIDs can be returned.
    Action: Remove ROWID from the view selection clause, then re-execute the statement.
    ROWID isn't really an intressting column when doing BI...
    regards
    John
    http://obiee101.blogspot.com/

  • Oracle Error code: 1116, message: ORA-01116: error in opening database file

    Hi ,
    Please advise on this error message
    Oracle Error code: 1116, message: ORA-01116: error in opening database file 202 ORA-01110: data file 202: '/u02/app/oracle/oradata/ubidev12/dbf/temp02.dbf'
    All these while, the dashboard working well in my local computer application with server database.
    Just discovered this error when I refresh the data.
    Kindly advise.
    Thanks,
    Kim Yoke

    the more detail error is
    Oracle Error code: 1116, message: ORA-01116: error in opening database file 203 ORA-01110: data file 203: '/u02/app/oracle/oradata/ubidev12/dbf/temp03.dbf' ORA-27041: unable to open file SVR4 Error: 2: No such file or directory Additional information

  • Where can find Oracle error code and message?

    Where can find Oracle error code and message?

    http://otn.oracle.com/pls/db92/db92.to_toc?pathname=server.920%2Fa96525%2Ftoc.htm&remark=docindex
    That would be the "Error Messages" manual.

  • Oracle Error Code and Message for Query Timeout

    Hi,
    I need to catch the oracle error code and message for query timeout.
    I am using Oracle 9i and could not find any relevant error code/message
    for query timeout in Oracle Error Messages.
    If anyone has encountered such error messages, please let me know the
    Oracle Code or Error message.
    Thanks & Regards,
    Kanjana

    Fly is correct in that Oracle will normally let a query run forever in the absense of a user profile or dbms_resource setting that limits a users (query) resouce usage.
    The errors returned for these condition would probably vary but errors ORA-02092 "exceeded session limit on CPU usage, you are being logged off" and ORA-02093 "exceeded call limit on CPU usage" might be of interest.
    But for distributed queries Oracle does impose a time limit. See Oracle error ORA-02049 "timeout: distributed transaction waiting for lock"
    HTH -- Mark D Powell --

  • Oracle error code and description

    Gurus,
    Is there a distinct list of oracle error code with description(in excel or txt,csv format) , the requirement is to convert most of generic oracle messages into user defined messages and store it in a XML.
    Regards
    R
    Edited by: Darthvader-647181 on Aug 11, 2010 8:00 AM

    HareeshGhanta wrote:
    Hi,
    Thank you.I am looking for some additional information like Cause and Action also to be printed out.Is there any way we can achieve this.
    Regards
    Sounds like you are trying to re-invent the wheel.
    What's wrong with the message text as supplied by oracle?  Those messages are universally known and understood -- well, at least by people who actually read them vs. simply dumping them to a forum.  Why would you want to obfuscate them with your own text?
    As for "cause and action", if one has the error code emitted by oracle, there are boat load of web sites that already replicate the same information that oracle itself supplies:
    oracle:dwdev$ oerr ora 12154
    12154, 00000, "TNS:could not resolve the connect identifier specified"
    // *Cause:  A connection to a database or other service was requested using
    // a connect identifier, and the connect identifier specified could not
    // be resolved into a connect descriptor using one of the naming methods
    // configured. For example, if the type of connect identifier used was a
    // net service name then the net service name could not be found in a
    // naming method repository, or the repository could not be
    // located or reached.
    // *Action:
    //   - If you are using local naming (TNSNAMES.ORA file):
    //      - Make sure that "TNSNAMES" is listed as one of the values of the
    //        NAMES.DIRECTORY_PATH parameter in the Oracle Net profile
    //        (SQLNET.ORA)
    //      - Verify that a TNSNAMES.ORA file exists and is in the proper
    //        directory and is accessible.
    //      - Check that the net service name used as the connect identifier
    //        exists in the TNSNAMES.ORA file.
    //      - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA
    //        file.  Look for unmatched parentheses or stray characters. Errors
    //        in a TNSNAMES.ORA file may make it unusable.
    //   - If you are using directory naming:
    //      - Verify that "LDAP" is listed as one of the values of the
    //        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
    //        (SQLNET.ORA).
    //      - Verify that the LDAP directory server is up and that it is
    //        accessible.
    //      - Verify that the net service name or database name used as the
    //        connect identifier is configured in the directory.
    //      - Verify that the default context being used is correct by
    //        specifying a fully qualified net service name or a full LDAP DN
    //        as the connect identifier
    //   - If you are using easy connect naming:
    //      - Verify that "EZCONNECT" is listed as one of the values of the
    //        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
    //        (SQLNET.ORA).
    //      - Make sure the host, port and service name specified
    //        are correct.
    //      - Try enclosing the connect identifier in quote marks.
    //   See the Oracle Net Services Administrators Guide or the Oracle
    //   operating system specific guide for more information on naming.

  • Oracle Error Code Table Exist?

    I am wondering if there is a table in the DD (or elsewhere) that contains the message text associated with Oracle error codes? I know that oerr can be used (outside of the DB), but we are hoping these exist in a table for an auditing application we are trying to work.
    Thanks.

    They are accessible via the SQLERRM function, e.g.
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> SET SERVEROUTPUT ON;
    SQL> BEGIN
      2     FOR i IN 100 .. 110 LOOP
      3        DBMS_OUTPUT.PUT_LINE (SQLERRM (-i));
      4     END LOOP;
      5  END;
      6  /
    ORA-00100: no data found
    ORA-00101: invalid specification for system parameter DISPATCHERS
    ORA-00102: network protocol  cannot be used by dispatchers
    ORA-00103: invalid network protocol; reserved for use by dispatchers
    ORA-00104: deadlock detected; all public servers blocked waiting for resources
    ORA-00105: too many dispatcher configurations
    ORA-00106: cannot startup/shutdown database when connected to a dispatcher
    ORA-00107: failed to connect to ORACLE listener process
    ORA-00108: failed to set up dispatcher to accept connection asynchronously
    ORA-00109: invalid value for attribute :
    ORA-00110: invalid value  for attribute , must be between  and
    PL/SQL procedure successfully completed.
    SQL>

  • Capturing oracle error codes into a variable

    Hi
    Can someone show me how it is possible to save an Oracle defined error code into a variable? What I am trying to do is when a stored procedure fails an Oracle error is raised, such as ORA-xxxx, then pass this code into variable to be saved into a log.
    How do I achieve this?

    user633278 wrote:
    How do I achieve this?Function SQLCODE in PL/SQL exception handler returns error code. SQLERRM returns message:
    SQL> declare
      2      x number;
      3  begin
      4      x := 1/0;
      5    exception
      6      when others
      7        then
      8          dbms_output.put_line('Error code: ' || SQLCODE);
      9          dbms_output.put_line('Error message: ' || SQLERRM);
    10  end;
    11  /
    Error code: -1476
    Error message: ORA-01476: divisor is equal to zero
    PL/SQL procedure successfully completed.
    SQL> SY.

  • Oracle Error Code -3113

    Hi All
    I am working on an application which needs to handle the sql error code -3113 ("end-of-file on communication channel").
    When the application (PRO C) gets a -3113 error from the database it should run a series of steps.
    To simulate this feature i shutdown the database (not the listener).
    The problem that i am facing is this.
    In some databases the SQL query returns immediately with an -3113 error when the database is down. In others it takes well over 8 minutes to return. Why is this? Can’t i reduce this time?
    Regards
    David

    On the server side database logs do you see an ORA-600 from the same time as the ORA-3113?
    Usually, this kind of thing is a database bug that needs to be patched.
    Christian Shay
    Oracle

  • Dbms_Scheduler - finding out Oracle error codes / messages for failures

    Hi,
    I am using Oracle OLAP to schedule a refresh of cube data in the background and this is using the dbms_scheduler functionality, now I need to find out when and why a refresh job fails. I have found the dba_scheduler_job_log which tells me if it failed but I can't find anywhere why ?? Are the failure reasons logged anywhere ??
    Thanks in Advance,
    Brandon

    PUBLIC.DBA_SCHEDULER_JOB_RUN_DETAILS [SYNONYM]
    SYS.DBA_SCHEDULER_JOB_RUN_DETAILS [VIEW]
    The details of a job run
    Column Name                    NN? Datatype                           Comment
    LOG_ID                             NUMBER                             The unique id of the log entry. Foreign key on entry in
    LOG_DATE                           TIMESTAMP(6) WITH TIME ZONE        The date of the log entry
    OWNER                              VARCHAR2(30)                       The owner of the scheduler job
    JOB_NAME                           VARCHAR2(65)                       The name of the scheduler job
    JOB_SUBNAME                        VARCHAR2(65)                       The subname of the scheduler job (for a chain step job)
    STATUS                             VARCHAR2(30)                       The status of the job run
    ERROR# NUMBER The error number in the case of error
    REQ_START_DATE                     TIMESTAMP(6) WITH TIME ZONE        The requested start date of the job run
    ACTUAL_START_DATE                  TIMESTAMP(6) WITH TIME ZONE        The actual date the job ran
    RUN_DURATION                       INTERVAL DAY(3) TO SECOND(0)       The duration that the job ran
    INSTANCE_ID                        NUMBER                             The id of the instance on which the job ran
    SESSION_ID                         VARCHAR2(30)                       The session id of the job run
    SLAVE_PID                          VARCHAR2(30)                       The process id of the slave on which the job ran
    CPU_USED                           INTERVAL DAY(3) TO SECOND(2)       The amount of cpu used for this job run
    ADDITIONAL_INFO                    VARCHAR2(4000)                     Additional information on the job run, if applicable

  • Oracle List of Error codes and messages

    Hi,
    In our application we are planning to use sqlloader to load a huge amount of data into the database. However, to parse the log file we need a list of Oracle error codes and messages that are commonly encountered while loading data using sqlloader. Does anyone know where to get such a list?
    Thanks

    In our application we are planning to use sqlloader to load a huge amount of data into the database. However, to parse the log file we need a list of Oracle error codes and messages that are commonly encountered while loading data using sqlloader. Does anyone know where to get such a list?I don't know where to get such a list, but for a start you could search the log for the words "Error" and "ORA-"

  • Internal Table with Oracle's Error Codes

    Hi,
    Is there any internal table where is stored every oracle error code with it's Cause, Action and all the other similar stuff?
    Att,

    For a table of all "ORA-" error codes and messages, you could do something like:
    <BR>
    create type t_oracle_error is object (
    error_num varchar2(9),
    error_desc varchar2(1024)
    create type t_oracle_error_tab is table of t_oracle_error;
    create or replace function OracleErrors return t_oracle_error_tab pipelined is
      l_error t_oracle_error := t_oracle_error(null,null);
    begin
      for errNo in reverse -32799..0 loop
        l_error.error_num := errNo;
        l_error.error_desc := sqlerrm(errNo);
        if l_error.error_desc not like '%Message % not found;%' and l_error.error_desc != 'ORA'||to_char(errNo,'FM09999')||': ' then
          pipe row(l_error);
        end if;
      end loop;
      return;
    end OracleErrors;
    select * from table(oracleerrors);
    SQL> select * from table(oracleerrors);
    ERROR_NUM ERROR_DESC
    0         ORA-0000: normal, successful completion
    -1        ORA-00001: unique constraint (.) violated
    -17       ORA-00017: session requested to set trace event
    -18       ORA-00018: maximum number of sessions exceeded
    -19       ORA-00019: maximum number of session licenses exceeded
    -20       ORA-00020: maximum number of processes () exceeded
    -21       ORA-00021: session attached to some other process; cannot switch session
    -22       ORA-00022: invalid session ID; access denied
    -23       ORA-00023: session references process private memory; cannot detach session
    -24       ORA-00024: logins from more than one process not allowed in single-process mode
    -25       ORA-00025: failed to allocate
    -26       ORA-00026: missing or invalid session ID
    -27       ORA-00027: cannot kill current session
    -28       ORA-00028: your session has been killed
    -29       ORA-00029: session is not a user session
    -30       ORA-00030: User session ID does not exist.
    -31       ORA-00031: session marked for kill
    -32       ORA-00032: invalid session migration password
    -33       ORA-00033: current session has empty migration password
    -34       ORA-00034: cannot  in current PL/SQL session
    -35       ORA-00035: LICENSE_MAX_USERS cannot be less than current number of users
    -36       ORA-00036: maximum number of recursive SQL levels () exceeded
    -37       ORA-00037: cannot switch to a session belonging to a different server group
    -38       ORA-00038: Cannot create session: server group belongs to another user
    -50       ORA-00050: operating system error occurred while obtaining an enqueue
    -51       ORA-00051: timeout occurred while waiting for a resource
    -52       ORA-00052: maximum number of enqueue resources () exceeded
    -53       ORA-00053: maximum number of enqueues exceeded
    -54       ORA-00054: resource busy and acquire with NOWAIT specified
    -55       ORA-00055: maximum number of DML locks exceeded
    -56       ORA-00056: DDL lock on object '.' is already held in an incompatible mode
    -57       ORA-00057: maximum number of temporary table locks exceeded
    -58       ORA-00058: DB_BLOCK_SIZE must be  to mount this database (not )
    -59       ORA-00059: maximum number of DB_FILES exceeded
    -60       ORA-00060: deadlock detected while waiting for resource
    -61       ORA-00061: another instance has a different DML_LOCKS setting
    -62       ORA-00062: DML full-table lock cannot be acquired; DML_LOCKS is 0
    -63       ORA-00063: maximum number of LOG_FILES exceeded
    -64       ORA-00064: object is too large to allocate on this O/S (,)
    -65       ORA-00065: initialization of FIXED_DATE failed
    -66       ORA-00066: LOG_FILES is  but needs to be  to be compatible
    -67       ORA-00067: invalid value  for parameter ; must be at least
    -68       ORA-00068: invalid value  for parameter , must be between  and
    -69       ORA-00069: cannot acquire lock -- table locks disabled for
    -70       ORA-00070: command  is not valid
    -71       ORA-00071: process number must be between 1 and
    -72       ORA-00072: process "" is not active
    -73       ORA-00073: command  takes between  and  argument(s)
    -74       ORA-00074: no process has been specified
    -75       ORA-00075: process "" not found in this instance
    -76       ORA-00076: dump  not found
    -77       ORA-00077: dump  is not valid
    -78       ORA-00078: cannot dump variables by name
    -79       ORA-00079: variable  not found
    -80       ORA-00080: invalid global area specified by level
    -81       ORA-00081: address range [, ) is not readable
    -82       ORA-00082: memory size of  is not in valid set of [1], [2], [4]
    -83       ORA-00083: warning: possibly corrupt SGA mapped
    -84       ORA-00084: global area must be PGA, SGA, or UGA
    -85       ORA-00085: current call does not exist
    -86       ORA-00086: user call does not exist
    -87       ORA-00087: command cannot be executed on remote instance
    -88       ORA-00088: command cannot be executed by shared server
    -89       ORA-00089: invalid instance number in ORADEBUG command
    -90       ORA-00090: failed to allocate memory for cluster database ORADEBUG command
    -91       ORA-00091: LARGE_POOL_SIZE must be at least
    -92       ORA-00092: LARGE_POOL_SIZE must be greater than LARGE_POOL_MIN_ALLOC
    -93       ORA-00093:  must be between  and
    -94       ORA-00094:  requires an integer value
    -96       ORA-00096: invalid value  for parameter , must be from among
    -97       ORA-00097: use of Oracle SQL feature not in SQL92  Level
    -99       ORA-00099: timed out while waiting for resource, potential PDML deadlock
    -100      ORA-00100: no data found
    -101      ORA-00101: invalid specification for system parameter DISPATCHERS
    -102      ORA-00102: network protocol  cannot be used by dispatchers
    -103      ORA-00103: invalid network protocol; reserved for use by dispatchers
    -104      ORA-00104: deadlock detected; all public servers blocked waiting for resources
    -105      ORA-00105: dispatching mechanism not configured for network protocol
    -106      ORA-00106: cannot startup/shutdown database when connected to a dispatcher
    -107      ORA-00107: failed to connect to ORACLE listener process
    -108      ORA-00108: failed to set up dispatcher to accept connection asynchronously
    -111      ORA-00111: not all servers started because number of servers is limited to
    -112      ORA-00112: only created up to  (maximum specified) dispatchers
    -113      ORA-00113: protocol name  is too long
    -114      ORA-00114: missing value for system parameter SERVICE_NAMES
    -115      ORA-00115: connection refused; dispatcher connection table is full
    -116      ORA-00116: SERVICE_NAMES name is too long
    -117      ORA-00117: value out of range for system parameter SERVICE_NAMES
    -118      ORA-00118: value out of range for system parameter DISPATCHERS
    -119      ORA-00119: invalid specification for system parameter
    -120      ORA-00120: dispatching mechanism not enabled or installed
    -121      ORA-00121: SHARED_SERVERS specified without DISPATCHERS
    -122      ORA-00122: cannot initialize network configuration
    -123      ORA-00123: idle public server terminating
    -124      ORA-00124: DISPATCHERS specified without MAX_SHARED_SERVERS
    -125      ORA-00125: connection refused; invalid presentation
    -126      ORA-00126: connection refused; invalid duplicity
    -127      ORA-00127: dispatcher  does not exist
    -128      ORA-00128: this command requires a dispatcher name
    ...

  • Giving name to existing oracle error number in my code

    I need to handle the array error on a bulk insert . Is there any danger in doing the following? The error -24381 is NOT my custom error but a standard oracle error.
    Package Header
    PRAGMA EXCEPTION_INIT(array_dml_error, -24381);
    Package Body
    BULK INSERT
    EXCEPTION
    WHEN array_dml_error THEN
    WHEN OTHERS THEN
    Please help?
    Edited by: user4900730 on Apr 19, 2010 2:43 PM
    Edited by: user4900730 on Apr 19, 2010 2:44 PM

    You may want to check the following link from asktom... detailed discussion on BULK error mapping and handing.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:8912264456901
    AND
    http://asktom.oracle.com/pls/asktom/f?p=100:11:2431746583773006::::P11_QUESTION_ID:8784259916366
    CTRL-F for -24381 in these pages.
    I have seen name being given to standard Oracle error codes in large production application.
    As long as it is well documented and managed, I believe it is ok.
    Can't really think of any technical downside. ;-)
    vr
    Sudhakar B.
    Edited by: SudhakarB on Apr 19, 2010 6:24 PM
    Meant to say CTRL-F

  • Oracle error ORA-604 when opening a connection

    I am facing an issue with my WCF service which is using ODP.NET version 4.112.2.0(x64) and Oracle 11g.
    The service runs without any problems on the test servers but on production server (Windows 2008 R2) when an attempt is made to call any service method it fails with the following Oracle error code Ora-604. the message is
    ORA-604: error occurred at recursive SQL level %s
    The exception is thrown when a call to meethod Open is made to open a connection.
    There is no inner exception. So far I have tried checking the connection string, the user permissions and setting the TNS_ADMIN environment variable but nothing has worked.
    Another thing to mention is that another WCF service which uses some of the same stored procedure I am using is working fine on the same server.
    Has anyone seen this before?
    Thanks,
    A

    Do you have a login trigger?
    select * from dba_triggers where triggering_event like 'LOGON%'
    If so, try disabling it.
    Does the working service use the same credentials as this problem service?
    Are you able to connect using sqlplus, with the same credentials from the same client to the same database? If it's not an ODP.NET specific problem, the dba guys might be able to help better: General Database Discussions
    Greg

Maybe you are looking for