Given a facility and error number, the OERR utility will display the complete error message text and, often, the source of the error and recommended steps for resolving the problem. It is quite simple to use. Should you forget how to use it, merely run the command OERR and its usage information will be provided as shown in the following listing:

$ oerr
Usage: oerr facility error

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

The following listing shows an example of OERR in use:

$ oerr tns 12550
12550, 00000, "TNS:syntax error"
// *Cause: The supplied connect descriptor contains illegal syntax.
// Action: Check the syntax of the connect descriptor in TNSNAMES.ORA.*

Caveats on the use of OERR

Occasionally, you may enter an incorrect facility as a result of a typographic error. If so, OERR will show the following message:

$ oerr tnd 12550
oerr: Unknown facility: tnd

If, however, you enter an incorrect error number, OERR will comply and show the information for that error number, if available.

How OERR works

OERR is implemented as a shell script. It combines the arguments you provide on the command line and uses them to search through Oracle's messages files. If you want to see the error messages files for yourself, you will find them in $ORACLE_HOME/*/mesg/*.msg. Each file name is formed by concatenating the facility name with the locale. The character or two between the facility name and the .msg extension typically indicates the locale for the messages. For example, error messages for the U.S. version of the software are usually found in the files named *us.msg.

The locale is determined from either the NLS_LANG environment variable, or if it is not set, the LANGUAGE environment variable is employed. If neither is set, OERR presumes the U.S. locale. For example, the error message shown above was found in the TNS facility file for the U.S. locale, or tnsus.msg.

Additionally, if you look in the first line of each file, you may see a macro specifying the locale. For example, the file $ORACLE_HOME/network/mesg/tnsnl.msg contains as its first line:

# CHARACTER_SET_NAME="DUTCH_THE NETHERLANDS.WE8ISO8859P1"

Click Here for cross-reference tables containing facility prefixes and locale suffixes.

Alternatives to OERR

OERR is not available on all platforms; most notably, it is not provided for the Microsoft Windows environments. However, the information it provides is found in Oracle's on-line documentation. Using either a web browser or an Adobe Acrobat PDF file reader, you can find the information OERR provides in the volume entititled "Oracle8 Error Messages."

You may also access the complete list of Oracle error messages using the Knowledge Xpert for Oracle Administration's Instant Messages facility.

NOTE: Oracle applications running under Microsoft Windows provide the error information using binary message files similar to the text ones that OERR uses. They are found throughout the $ORACLE_HOME on Windows with the extension .msb.