Sily question: ORACLE errors

Is there any way to store the ALL the oracle error code "ORA-xxxx" and error message in a table.??
qamar

Hi Qamasyed,
yes there is a way, here we are, this will store the first 110 errors into the errors table:
column message format a100
CL SCR
CREATE TABLE errors (
     error# NUMBER,
     message VARCHAR2(255));
DECLARE
v_error_code           NUMBER :=1;
v_error_message          VARCHAR2(255);
v_counter           NUMBER :=1;
BEGIN
FOR i in 1..110 LOOP
v_counter := v_counter+1;
v_error_code := SQLCODE(-i);
v_error_message :=SQLERRM(-i);
INSERT INTO errors VALUES (v_error_code, v_error_message);
END LOOP;
END;
PAUSE
SELECT *
FROM errors;
-- Hope this helps you.
=;-)
Lutz
*/

Similar Messages

  • Oracle errors in Weblogic Error logs appear in non english

    We have a problem with weblogic error logging. Specifically, in a managed server's log file, Oracle errors such as ORA-XXXX show in Greek, not English. We are assuming
    that this is because the timezone is Europe/Athens. However, the weblogic application server runs with user.language=en, user.country=US. What's more, there are 4 application servers and 2 of them have this problem. The oracle database is accessed via weblogic datasources.
    Oracle database server Setup: Oracle Server 11gR2 running on Oracle Linux 64 bit, timezone set to Europe/Athens
    Weblogic Server: Weblogic 10.3.5 running on Oracle Linux 64 bit, timezone set to Europe/Athens
    The managed server, according to jrockit, the jvm runs with the following language related system properties:
    user.language=en, user.country=US, user.timezone=Europe/Athens
    The question is: How do we tell oracle / weblogic to log english text for the ORA errors?
    Thanks,
    Chris

    I digged in the weblogic installation directory and it seems like the domain configuration wizard messed up the jdbc configs for the data sources.
    The config xml files for the data sources in the /domain root/config/jdbc directory had oracle driver but the test query was for pointbase. I double checked from the database.xml file in the init-info directory and corrected the entry in the datasource config xmls and voila!.. the errors were gone.
    I am not sure if this was the right approach and whether i have solved the issue or simply patched it.. so I am keeping the question open. If any one has any inputs I will be grateful.
    If the mods/admins feel that the thread should be marked as solved I will surely do so.
    Thanks.

  • Oracle error 1403:java.sql.SQLException: ORA-01403: no data found ORA-06512

    My customer has an issue, and error message as below:
    <PRE>Oracle error 1403: java.sql.SQLException: ORA-01403: no data found ORA-06512:
    at line 1 has been detected in FND_SESSION_MANAGEMENT.CHECK_SESSION. Your
    session is no longer valid.</PRE>
    Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.
    And customer’s statement is: Upgrade from EBS 11.5.10 to 12.1.3. Login the EBS, open any forms and put it in idle. Then refresh the form, error happens
    Then, I checked ISP, and found two notes:
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid (Doc ID 1284094.1)
    Note 1319380.1: Webadi Gl Journal Posting Errors After Atg R12.1.3 (Doc ID 1319380.1)
    But these two notes are both WebADI.
    Following is the data collection from customer:
    1. Run UNIX command to check .class file version:
    strings $JAVA_TOP/oracle/apps/bne/utilities/BneViewerUtils.class | grep Header--> S$Header: BneViewerUtils.java 120.33.12010000.17 2010/11/21 22:19:58 amgonzal s$
    2. Run SQL to check you patch level:
    SELECT * FROM fnd_product_installations WHERE patch_level LIKE '%BNE%';--> R12.BNE.B.3
    3. Run SQL to check patch '9940148' applied or not:
    SELECT * FROM ad_bugs ad WHERE ad.bug_number = '9940148';--> No Rows returned
    4. Run SQL to check patch '9785477' applied or not:
    SELECT * FROM ad_bugs WHERE bug_number in ('9785477');-->
    BUG_ID APPLICATION_SHORT_NAME BUG_NUMBER CREATION_DATE ARU_RELEASE_NAME CREATED_BY LAST_UPDATE_DATE LAST_UPDATED_BY TRACKABLE_ENTITY_ABBR BASELINE_NAME GENERIC_PATCH LANGUAGE
    576982 11839583 2011/8/7 上午 08:20:36 R12 5 2011/8/7 上午 08:20:36 5 pjt B n US
    516492 9785477 2011/6/12 上午 11:42:45 R12 5 2011/6/12 上午 11:42:45 5 bne B n US
    546109 9785477 2011/6/12 下午 01:17:41 R12 5 2011/6/12 下午 01:17:41 5 bne B n ZHT
    5. Run SQL to check the status of object ‘FND_SESSION_MANAGEMENT’
    SELECT * FROM dba_objects do WHERE do.object_name = 'FND_SESSION_MANAGEMENT';-->
    OWNER OBJECT_NAME SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP STATUS TEMPORARY GENERATED SECONDARY NAMESPACE EDITION_NAME
    APPS FND_SESSION_MANAGEMENT 219425 PACKAGE 2004/10/30 下午 01:52:35 2011/8/7 上午 08:18:39 2011-08-07:08:18:26 VALID N N N 1
    APPS FND_SESSION_MANAGEMENT 226815 PACKAGE BODY 2004/10/31 上午 01:05:40 2011/8/7 上午 08:18:54 2011-08-07:08:18:27 VALID N N N 2
    So, my question is: Customer’s BneViewerUtils.java version is already 120.33.12010000.17, which greater than 120.33.12010000.14. Is there any others solutions for this issue? Does customer still need to apply patch '9940148' based on action plan of
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid?
    Customer's EBS version is 12.1.3; OS is HP-UX PA-RISC (64-bit); DB is 11.2.0.2.
    Thanks,
    Jackie

    And customer’s statement is: Upgrade from EBS 11.5.10 to 12.1.3. Login the EBS, open any forms and put it in idle. Then refresh the form, error happens
    Idle for how long? Is the issue with all sessions?
    Please see these docs/links
    User Sessions Get Timed Out Before Idle Time Parameter Values Are Reached [ID 1306678.1]
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Timeout+AND+R12&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Then, I checked ISP, and found two notes:
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid (Doc ID 1284094.1)
    Note 1319380.1: Webadi Gl Journal Posting Errors After Atg R12.1.3 (Doc ID 1319380.1)
    But these two notes are both WebADI.Can you find any details about the error in Apache log files and in the application.log file?
    Any errors in the database log file?
    So, my question is: Customer’s BneViewerUtils.java version is already 120.33.12010000.17, which greater than 120.33.12010000.14. Is there any others solutions for this issue? No.
    Does customer still need to apply patch '9940148' based on action plan ofIf the issue not with Web ADI, then ignore this patch. However, if you use Web ADI you could query AD_BUGS table and verify if you have the patch applied.
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid?
    Customer's EBS version is 12.1.3; OS is HP-UX PA-RISC (64-bit); DB is 11.2.0.2.If you could not find any details in the logs, please enable debug as per (R12, 12.1 - How To Enable and Collect Debug for HTTP, OC4J and OPMN [ID 422419.1]).
    Thanks,
    Hussein

  • About Multi-ORG for EBS R12.1.1 .. Oracle error -20001 ORA-20001 APP-FND-02

    I have two questions:
    1. If I have only single organization, Do I need to set up multi-org? We will be using AR, AP, and GL modules only.
    2. Is there any step-by-step process to set up multi-org?
    I am getting error: "Oracle error -20001 ORA-20001 APP-FND-02901. You do not have access to any operating unit. Please check if your profile option MO:Security Profile includes any operating unit or the profile option MO: operating unit is set has been detected in MO_GLOBAL_INIT" when I access any form for Entry.
    Thanks

    1. If I have only single organization, Do I need to set up multi-org? We will be using AR, AP, and GL modules only.Yes.
    2. Is there any step-by-step process to set up multi-org?https://forums.oracle.com/forums/search.jspa?threadID=&q=MultiOrg&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    I am getting error: "Oracle error -20001 ORA-20001 APP-FND-02901. You do not have access to any operating unit. Please check if your profile option MO:Security Profile includes any operating unit or the profile option MO: operating unit is set has been detected in MO_GLOBAL_INIT" when I access any form for Entry.Does this happen to all responsibilities?
    Please see the steps in (ORA-20001: APP-FND-02901 Errors Encountered When "Requests" Tab is Selected from PFT or EPF [ID 859072.1]) to set the profile option at the responsibility level for the responsibility you are trying to access.
    Thanks,
    Hussein

  • Using PreparedStatement and the Oracle Error ORA-1000

    Hi,
    I have a question about PreparedStatement objects that is not so simple to explain for me. What I would like to know is: if I use a PreparedStatement following traditional and generic steps:
    1- PreparedStatement pStmt = Connection.prepareStatement(sQuery);
    2- pStmt.setXXX(i,j);
    n - pStmt.setXXX(i,j);
    n+1 - ResultSet rs = pStmt.executeQuery();
    n+2 - while(rs.next()){ ... retrive ResultSet data  ... }
    n+3 - rs.close()
    n+4 - back to point number 2
    and at the end (as you can see in the point numbered n+4), instead of closing the PreparedStatement pStmt using the close() method, I reuse the PreparedStatement pStmt comeing back to the point numebr 2 and setting again all its parameters with new values ... then ... what heppens in the Oracle database ? Has been the cursor (so the mamory area), associated to my PreparedStatement object pStmt, duplicated or is it the same ?
    I know that Java allows you to do this kind of operations with PreparedStatement, and I know that in tha Java Documentation is explained to follow this strategy to optimize the execution time because in this way the same PreparedStatement is precompiled and prepared only once. But if I do a for loop following the steps explained before, after many iterations I have the error "ORA-1000: maximum open cursors exceeded". This error is the reason of my question. Does this error means that it's mandatory to close a PreparedStatement always, otherwise if you reuse it without closing it then the corresponding database cursor will be duplicated ? If it is so, then I think this is a contradiction with official java documentation ...
    I'm using Oracle8i (version 8.1.7) and Oracle JDBC Thin Driver (Windows NT) for use with JDK 1.2.x. Moreover, in my database istance the parameter "maximum open cursor" is equal to 800 ...
    Thank you very much for suggestions :-)

    There is no need to close a prepared statement or its resultset for every iteration.
    After the first iteration in a loop, all subsequent executions of it will close the previous resultset. By adding close() method, you are making one extra costly call to the DB for no reason.
    Following is the sample code.I know what you are saying. In fact at the beginning I wrote my code in the same way of your sample (see the code of my first post at the begin of this page).
    But doing so, after thousand iterations of the loop, I had "Oracle Error ORA-1000 : maximun open cursor exeeded" even if in my database istance the parameter "maximum open cursor" is equal to 8000.
    At this moment in my code, for each iteration, I close the PreparedStatement and in this way I don't have anymore the error :-((
    So it seems that only in theory we can reuse a preparedStatement without closing it. In fact if we see the oracle system table "$open_cursor" (as Konrad Pietzka suggest me) we can find that, for each interation,
    at our line code "rs = pstmt.executeQuery();" correspond a new cursor in the database: this means that for each method "pstmt.executeQuery()" the database open a new cursor and do not use the previous one as it should.
    I posted a question two months ago to search if someone had the same problem (it seems that Konrad Pietzka had the same situation) and was able to explain me what is the cause.
    The only reason I found by myself for this problem, is that probably the Oracle JDBC Thin Driver for Windows NT/2000 has some bugs... but I'm not sure ...
    Thank you very much for you time !!
    bye :-))
    Fidalma

  • Forms Personalization - FRM-40502: ORACLE error: unable to read list of val

    Hi,
    I am using Forms Personalization to create an LOV using builtin. In the Builtin, I have put the sql query under create record group from query. In the query, when I hardcode a value, in a where condition, the LOV works fine but when I replace the hardcoded value with :block.field value, it gives the error, FRM-40502: ORACLE error: unable to read list of values. Below is the part of the sql query where I am facing this issue.
    "WHERE related_customer_id = :ORDER.INVOICE_TO_CUSTOMER_ID"
    Please get back to me if anyone has faced similar problem.
    Thanks all in advance,
    Regards,
    AN

    Please post a new thread for each issue. Tacking onto a 2 year old post is generally a bad idea.
    Forms personalization is a feature in Oracle E+Biz Suite and as such you should post your question in this forum:
    OA Framework

  • Lookup of Oracle Error Message at application level

    Hi
    I'm writing a c# application that connects to an oracle database. My application queries a table containing a column with oracle error codes BUT NO ERROR MESSAGES. The application must show these error descriptions to the user. As I cannot expect the user to know errorcodes, the application should be able to translate it into the error message
    e.g.: instead of showing "ORA-13349" I'd like to show a textbox "polygon boundary crosses itself".
    Question: is the mapping <error_code, error_message> accessible to an application? How ?
    Thank you,
    Marco
    ps: it's not possible to change the stored procedure! I've to solve it at the application level

    You can use the function: standard.sqlerrm and pass as parameter the number of the error.
    http://www.tunzi.ch/page.php?name=errm
    Bye, Aron

  • "FRM-40501: Oracle error: Unable to Reserve Record For Update or Delete"

    "FRM-40501: Oracle error: Unable to Reserve Record For Update or Delete"
    as I can unblock a session in the graphical surroundings of administration of the BD 10g of Oracle

    From experience with this problem since the blocked customer form has been coded not to wait for the updating session to complete then there is likely no waiter on the system now so you cannot find the blocking session.
    What you need to do is determine what row the Form was going after then using SQLPlus issue an update on the row. If the blocking session has not yet committed then this update will wait. Now if you look for blocking sessions you will be able to find it and make a determination if the session should be killed or if someone needs to call the user and ask he or she to flip through their screens and get out of the blocking screen.
    Applications screens written not to wait on currently being updated data need to also be written to expose the information necessary to identify the row(s) in question.
    HTH -- Mark D Powell --

  • The error: "Oracle Error 904 / Invalid Column name"

    When I try to take the Oracle Backup with the Exp command. I got the following error.
    The error: "Oracle Error 904 / Invalid Column name" .
    Any solution or suggestion?????????

    Asif, to add another question to the list of things to check. Is the version of the exp utility you are using to perform the export operation the same version as the database? If not, that would explain the error.
    If you are trying to export using a newer version of the export utility that generally will not work. You should switch to using the db version.
    If you are exporting using an older version because the target is an older version then usually you need to run the catexp# where # is the version number script for the target version that Oracle provides in the $ORACLE_HOME/rdbms/admin directory.
    HTH -- Mark D Powell --

  • Capture Oracle errors

    Hi, I have a problem: I am inserting information from a table to many other tables, but if there's an error(for example, duplicate primary key), I have to put this information in a log... I have two questions: the log should be another table(for example with the sysdate and a description of the error)? The other: How can I register the Oracle errors in the log?
    Thanks

    Hi,
    New in 10g, maybe you are on an earler version?
    (Or maybe you just lack execute privilege on dbms_errlog)
    In 9i an option could be [FORALL ... SAVE EXCEPTIONS|http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/05_colls.htm#32392], but it's a lot more clumpsy to work with.
    If you are looking for a simple logging framework, you can have a look at [log4plsql|http://log4plsql.sourceforge.net/]
    Regards
    Peter
    Edited by: Peter on Nov 24, 2009 10:43 AM
    - Added link to log4plsql

  • Oracle Error :: ORA-12637 Packet receive failed

    Hi buddies,
    One of my staff's PC is receiving this error sometimes when she is trying to connect to the database and she is able to connect sometimes.
    Oracle Error :: ORA-12637 Packet receive failed What could be the cause.
    I tried replacing her tnsadmin with my tnsadmin and it didn't make a change, still able to connnect sometimes and sometimes not.
    Able to connect using PL/SQL developer, but not using our customized application. (Everyone else are able to connect)
    Is it network problem?
    Please advice.
    Thank You very much.
    Alagu
    Edited by: user645399 on Sep 16, 2009 8:37 PM

    And from this cut-and-paste the OP is supposed to take what actions to solve the problem? Please don't just post that which is one google away every time someone posts an ORA- exception. You make some valuable contributions here but just posting expanded text doesn't give someone a list of actions to take that will help them resolve the issue. Better the question is left unanswered so others will be more likely to offer help.
    To the OP:
    It is highly likely you have a network issue and the fact that it is isolated to a single machine makes it reasonably easy to fix. First try to figure out which component is failing. Go to the router or switch and swap wires between that client machine and another one that is working properly. Does the problem move? If not then swap the wires. Again does the problem move? Next the NIC card? What if you put another machine on the desk and put the original hard disk in it?
    Sometimes it just isn't worth the effort so you just swap out the machine.
    Intermittent problems are always hard to identify and fix. What is on your side is that this is only affecting a single user.

  • Which Oracle error for UPDATE that finds no rows to update

    Can someone please confirm for me what is the Oracle error I will get when trying to do an UPDATE statement with WHERE clauses and no rows are found matching the WHERE clauses? I'm thinking it will be 1403, but want to be sure.
    Thank you.

    Thanks for the answers, and my apologies if I asked in the wrong forum. My program is C++, and I believe the update will produce a DAOSQLException. My intended question was what the error number for that exception would be, and it appears that it would be 1403.
    I am not just writing SQL statements, for which I realize (as many pointed out) that there would be no errors, just zero rows updated.
    Thanks.

  • Trap Oracle error.

    I am using Developer Suite 9i with Oracle 9i as the backend. I have a doubt with trapping Oracle error 'ORA-00054'. For trapping a 'frm' error, say 40401, i write this code:-
    DECLARE
    lv_errtype VARCHAR2(3) := ERROR_TYPE;
    lv_errcod NUMBER := ERROR_CODE;
    lv_errtxt VARCHAR2(80) := ERROR_TEXT;
    BEGIN
    IF lv_errcod = 40401 THEN
    null;
    END IF;
    END;
    But, how to trap this error, say ORA-00054 or any other ORA error. In the back-end, we declare a exception using 'init_pragma(name,error_code)' and handle it.
    In the forms front-end application, Developer Suite 9i, how do i handle that.
    I hope, my question is clear. Please help in solving the doubt as it is urgent.
    Regards.

    thanks for ur update, i was simulating a 'no data found' intentionally, and had written a ON-ERROR trigger at the form level using:-
    DECLARE
    lv_errtype VARCHAR2(3) := ERROR_TYPE;
    lv_errcod NUMBER := ERROR_CODE;
    lv_errtxt VARCHAR2(80) := ERROR_TEXT;
    BEGIN
    IF lv_errcod = 01403 THEN
    message('no data found');
    END IF;
    message(lv_errtype);
    END;
    But, the message 'no data found' is not being raised, 'if' condition is not getting satisfied. In 'ERROR_TYPE', it is showing 'FRM', whereas, i am trying to simulate a database error.

  • 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.

  • [SOLVED] FRM-40508:ORACLE error: unable to INSERT record

    Hi all,
    I have migrated this form from 4.5 to 10g (Version 10.1.2.0.2 ). This form inserts a record into the database table when all the fields in the form are filled and a button Save is presed.
    At the time when I press the Save button, I get this error. FRM-40508:ORACLE error: unable to INSERT record
    So I went on to see the "Display Error" from help and found to be the database error, inserting into a table.
    The error message is ORA-00932: inconsistent datatypes: expected DATE got NUMBER
    The form where I press Save button has 3 date fields and I checked the properties of them and they are Date only.
    I also generated to object list report and tried to find some answer, but no use.
    Please help me in debugging this form.
    Edited by: Charan on Aug 18, 2011 4:05 PM

    I think you need to get a description of the table and compare all the "database" columns in the form with the ones in the database table to see that the types match. Somewhere there's a mismatch. Also check the block(s) "query data source columns" and see if there's any
    columns in there that the type does not match the table. (check the sizes of things too while you're at it.)

Maybe you are looking for

  • "An iPhone has been previously synced with this computer" error on sync

    I recently resurrected an old original iPhone to use as an iPod touch (no phone contract) and started syncing it to my home Mac Mini, which is where I sync nearly all of my iPhone 3G data from. I can't honestly say which was the last iPhone to succes

  • Lightroom vs photoshop color management in printing.

    lightshop gives me completely different results when printing even using the same exact profile info (let printer decide) and relative method. same image works well in photoshop but shows sky as purple (instead of blue) in lightroom. any ideas what i

  • Premiere Freeze after videoCard Change

    In my PC, i change the video Card , from MSI GTS250 to nVidia  Quadro K4000 since that change , Premiere freeze for a few seconds when i preview a timeline I run GPUSniffer, and Adobe Premiere Recognize my new VideoCard I need some help

  • Customizing one Url in two languages

    Hello, please... i need help i have a direct link for finacle, (WEB SVS), they give me two Urls because they wany that when someone log on in SAP CRM ENGLISH, the link open in english, but if someone log on in spanish the link open in spain.... is th

  • Build table

    hi , i have a problem in saving  data in a table , bcuz i want  "DBL 64 bit real "  to save  in a table after each run of the program , not array of data , Attachments: New مستند Microsoft Word.doc ‏42 KB