The oerr itulity and show how oerr is used to display Oracle error message details

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarKiran Dalvi
  • 13 Feb, 2022
  • 0 Comments
  • 1 Min Read

The oerr itulity and show how oerr is used to display Oracle error message details

Oracle Database Tips by Ankush Thalavi

The oerr itulity and show how oerr is used to display Oracle error message details:

Viewing Errors with the oerr Utility is simple

The oerr utility (Oracle Error) is provided only with Oracle databases on UNIX platforms. oerr is not an executable, but instead, a shell script that retrieves messages from installed message files. The utility is not provided on Windows systems, since it uses awk commands to retrieve the requested text from the file.

The syntax required of the oerr utility is:

oerr facility number

The facility is the prefix to the error number. These include ORA, PLS, EXP, etc. The error is the actual error number returned by Oracle.

For example, if the database returned an ORA-12544 error, the following oerr command would be executed to gain more information:

$ oerr ora 12544 12544, 00000, “TNS:contexts have different wait/test functions” // *Cause: Two protocol adapters have conflicting wait/test functions. // *Action: Not normally visible to the user. For further details, turn // on tracing and reexecute the operation. If error persists, contact // Oracle Customer Support.

Notice that Oracle returned the "Cause" of the error and recommended "Action". This is usually the case, however many error codes exist with no cause or action text available.

The oerr utility (command line executable) can be used to look up Oracle error messages. Many products within Oracle contain an msg file, or message library. Available only on UNIX platforms and not on Windows, type oerr at the command prompt to receive help on how to use this tool.

%oerr Usage: oerr facility error

Facility is identified by the three-letter prefix in the error string. For example, if the developer gets ORA-7300, "ora" is the facility and "7300" is the error. So type "oerr ora 7300". If one gets LCD-111, type "oerr lcd 111", and so on.

Thanks for reading