Results 1 to 5 of 5
  1. #1
    Join Date
    May 2009
    Posts
    4

    Unanswered: Oracle Error routine

    Hi,

    In Sql Server, there is one function name is error_Procedure gives name of the procedure in application, which is throwing error. Is there is anything equivalent in Oracle? I mean, any object (oracle pre-defined procedure or function) which is giving ,which procedure is throwing error in application? Please help me immediately. it's quite urgent.

    In detail

    sqlcode :- gives error code
    sqlerrm :- gives what is the error message
    ?? :- which procedure/function/package is throwing error

    Advance thanks to all.

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Thumbs down Format_error_stack

    If you had done any resarch or just read the fine Oracle® Database PL/SQL Packages and Types Reference you would have found the solution is DBMS_UTILITY's FORMAT_ERROR_STACK Function.

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Dec 2003
    Posts
    1,074
    I'm not sure I understand ... that information is already passed out in the case of an error

    Code:
    create or replace procedure test_ex
    is
      var number(10);
    begin
      var := 1/0;
    end test_ex;
    / 
    procedure test_ex Compiled.
    
    begin
      test_ex;
    end;
    /
    ORA-01476: divisor is equal to zero
    ORA-06512: at "FORBESC.TEST_EX", line 5
    ORA-06512: at line 2
    Are you trying to do something with just the proc/func name, and so you want to insert it into a variable or something?

  4. #4
    Join Date
    Dec 2007
    Posts
    253
    Quote Originally Posted by akrish
    Please help me immediately. it's quite urgent.
    I must admit, I'm quite surprised that you got any answers at all to this drivel. Learn how to post properly on forums.

  5. #5
    Join Date
    May 2009
    Posts
    4
    Hi All,
    Actually , I am capturing the name of the Procedure/function/Package which is throwing error in to a table.

    DBMS_UTILITY.format_call_stack is capturing the name of the procedure which is throwing error.
    Thanks for all your Help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •