Database Reference
In-Depth Information
CHAPTER 35
■ ■ ■
OERR
T he OERR utility, which ships with Oracle software distributions for UNIX and Linux, provides
quick access to ORACLE DBMS error message texts based on an error message code. The code
consists of a facility name and a positive number. Furthermore, the cause and action sections
retrieved by OERR along with the error message may help in solving a problem at hand. The
OERR script is mentioned in Oracle10 g documentation in conjunction with TNS errors (see
Oracle Database Net Services Administrator's Guide ). It is undocumented that OERR supports
additional categories of errors except TNS. The SQL*Plus User's Guide and Reference Release 9.2
states that “the UNIX oerr script now recognizes SP2- error prefixes to display the Cause and
Action text”, but does not explain how to use OERR. It is undocumented that most events (e.g.,
10046 for extended SQL trace) known by the DBMS instance are also represented in the message
files read by OERR and that a short description on each event is available.
The OERR utility is not available for Windows. However, alternative implementations for
Windows developed by third parties are available freely on the Internet.
Introduction to the OERR Script
Occasionally, software running against the ORACLE DBMS server only reports an error code in
case of a failure and omits the associated error message. In such a situation, the OERR script
comes in handy, since it retrieves the error message associated with the error code. But it doesn't
stop there. Where available, it also prints probable causes of and remedies for the error. Too
bad it can't be persuaded to fix the problem, given that it “knows” what's wrong and how to fix
it! Here's an example of OERR in action:
$ oerr ora 2292
02292, 00000,"integrity constraint (%s.%s) violated - child record found"
// *Cause: attempted to delete a parent key value that had a foreign
// key dependency.
// *Action: delete dependencies first then parent or disable constraint.
OERR ships with each ORACLE DBMS software distribution for UNIX systems. It is imple-
mented by the Bourne Shell script $ORACLE_HOME/bin/oerr . Since the script is located in
$ORACLE_HOME/bin , there is no need to add a directory to the PATH variable to use it. When called
without arguments, OERR prints its usage.
459
 
Search WWH ::




Custom Search