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

  • SEARCH
  • Home
  • 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 8413411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:55:08+00:00 2026-06-10T00:55:08+00:00

My Question: How do you query an 11g Oracle database to get a description

  • 0

My Question: How do you query an 11g Oracle database to get a description of an error code?

Background: Someone told me they had seen code once which would query oracle for details on a specific ORA-code error. I’ve been searching on Google for a little while now and can’t seem to find anything like that. Does anyone know if this is possible? Is there a v$view for it or something?

Why: I want to write a procedure which will return the description of an error code I give to it. So when it’s written I could call it like this:

select ora_code_desc('ORA-00000')
from dual;

And it would output:

Normal, successful completion.
Cause: An operation has completed normally, having met no exceptions.
Action: No action required.

Or something like that 🙂 Thanks for the help!

  • 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-06-10T00:55:09+00:00Added an answer on June 10, 2026 at 12:55 am

    It’s not accessible from SQL but within PL/SQL, you can use the SQLERRM function.

    For example

    SQL> ed
    Wrote file afiedt.buf
    
      1  begin
      2    dbms_output.put_line( sqlerrm(0) );
      3    dbms_output.put_line( sqlerrm(-1041) );
      4* end;
    SQL> /
    ORA-0000: normal, successful completion
    ORA-01041: internal error. hostdef extension doesn't exist
    
    PL/SQL procedure successfully completed.
    

    You could, of course, build an ora_code_desc function that took in a string, removed the first three characters, passed the resulting number to SQLERRM, and returned the result

    SQL> ed
    Wrote file afiedt.buf
    
      1  create or replace function ora_code_desc( p_code in varchar2 )
      2    return varchar2
      3  is
      4    l_str varchar2(1000);
      5  begin
      6    l_str := sqlerrm( substr(p_code, 4 ) );
      7    return l_str;
      8* end;
    SQL> /
    
    Function created.
    
    SQL> select ora_code_desc( 'ORA-00000' ) from dual;
    
    ORA_CODE_DESC('ORA-00000')
    --------------------------------------------------------------------------------
    ORA-0000: normal, successful completion
    

    Oracle also ships a utility on Unix platforms oerr that provides more detail– particularly the cause and action you’re looking for. If you really want that data too, you could write a Java stored procedure that called out to an operating system shell, executed an oerr command, and returned the result. That would give you more data but would, obviously, be much more complex.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Oracle 11g & I have a question about a query. I
If I am posting a question about a query against an Oracle database, what
My question is how to get the number of rows returned by a query
I'm writing some JDBC code which calls a Oracle 11g PL/SQL procdedure which has
I have installed Oracle Database 11g Express Edition on my pc (windows 7) and
Question: I query a Quake3 masterserver via UDP, and get the response as below.
I've seen this question: Select query but show the result from record number 3
Basically this is a database and query question. How do you implement related post
I recently asked this question: Dynamically Query a Database to check for value And
My question is: How to get different values in one sql query? I am

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.