Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6244283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:18:00+00:00 2026-05-24T12:18:00+00:00

Sometimes the exception returns something like: ORA-06502: PL/SQL: numeric or value error: character string

  • 0

Sometimes the exception returns something like: “ORA-06502: PL/SQL: numeric or value error:
character string buffer too small”.

It’s not so readable since it doesn’t report neither the table, the column and the value it tried to write.

it would be useful to get the current procedure name at the moment the Exception happened or is catched.

How can I obtain that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T12:18:01+00:00Added an answer on May 24, 2026 at 12:18 pm

    You probably want DBMS_UTILITY.FORMAT_ERROR_BACKTRACE function

    SQL> ed
    Wrote file afiedt.buf
    
      1  create or replace procedure p1
      2  is
      3  begin
      4    raise_application_error( -20001, 'Error 1', true );
      5* end;
    SQL> /
    
    Procedure created.
    
    SQL> create or replace procedure p2
      2  as
      3  begin
      4    null;
      5    p1;
      6  end;
      7  /
    
    Procedure created.
    
    SQL> begin
      2    p2;
      3  exception
      4    when others then
      5      dbms_output.put_line( dbms_utility.format_error_backtrace );
      6  end;
      7  /
    ORA-06512: at "SCOTT.P1", line 4
    ORA-06512: at "SCOTT.P2", line 5
    ORA-06512: at
    line 2
    
    
    PL/SQL procedure successfully completed.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why does the following code sometimes causes an Exception with the contents CLIPBRD_E_CANT_OPEN: Clipboard.SetText(str);
I have a third-party library that is sometimes throwing an exception. So I decided
Java's checked exceptions sometimes force you to catch a checked exception that you believe
Sometimes in an application, one might compare the Message text of an exception. For
If my code throws an exception, sometimes - not everytime - the jsf presents
Creating an XPathDocument with referenced DTD sometimes throws a web exception. Why?
I really hate sometimes how IDictionary<TKey, TValue> [key] will throw an exception if the
When making changes using SubmitChanges() , LINQ sometimes dies with a ChangeConflictException exception with
Exceptions are wonderful things, but I sometimes worry that I throw too many. Consider
Sometimes I forget to use the return value when I have to. For example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.