OERR stands for Oracle Error, which is a utility ships with Oracle distribution for Linux and UNIX that helps retrieve messages from message (.msg) files based on the supplied error code. This utility is not available for Windows, but there are variants freely available on the Internet.
The error code consists of two parts, facility name and a positive error number:
Usage: oerr facility error
For example, if your application returns an error ORA-00001; you would simply lookup the cause and action as below:
$ oerr ORA 00001 00001, 00000, "unique constraint (%s.%s) violated" // *Cause: An UPDATE or INSERT statement attempted to insert a duplicate key. // For Trusted Oracle configured in DBMS MAC mode, you may see // this message if a duplicate entry exists at a different level. // *Action: Either remove the unique restriction or do not insert the key.
Many are under the assumption that oerr is a binary executable; In fact, it is a shell script (Bourne shell script text executable) located under $ORACLE_HOME/bin. When you execute the oerr, it checks:
– whether the ORACLE_HOME is set
– whether you passed facility and positive error code
– and reads information from $ORACLE_HOME/lib/facility.lis
- List of facilities available per faclility.lis:
AMD AUD AV BBED BRW CLSR CLSS CLST CPY CRS DA DAC DAH DAL DBV DGM DRG DS DS2 DSP DSW DSZ EBU EVM EXP FMC FMD FMF FMG FMM IAC IAD IAG IAP ILF IMG IMP KFED KFOD KGP KOP KUP LCD LDAP LDT LEM LFI LHT LMM LPM LPX LRM LSF LSX LTM LXCNV LXE LXI MD MGR MIG NAUK NCI NCIDL NCIERR NCR NCX NET NID NIQ NL NLT NMC NMCPI NMO NMP NMR NMS NMXECM NMXW NMZ NNC NNF NNL NNO NPL NZ O2 O2F O2I O2U OAE OAO OBK OCI OFC OMA OMAPI OMB OMD OMGUT OMKT OMU OMV OPW ORA OSN OSNQ PCB PCBE PCC PCF PCG PCI PCM PCP PCS PG2 PGO PGP PLS PLW PM PMX PPE PR2 PRC PRCO PRIF PRO PROC PROT PX PXU QSM RMAN SBT SCH SDO SMAMP SMG SMPSLR SNL SP1 SP2 SP3 SPW SQL SRW SRW2 SVPXNT SVPXOS TIX TLEM TNL TNPL TNS TS TXR TXU TYP UDE UDI UL VID VIR VPP VPXDBA VPXECM VPXOAFND VPXODB VPXSAPR3 WA XOQ
- Sample content of facility.lis:
$ cat facility.lis <...output removed to save space...> # facility:component:rename:description # aud:ord:*: amd:cwmlite:*: av:pfs:*: bbed:rdbms:*: brw:browser:*: clsr:racg:*: <...output removed to save space...> vpxoafnd:network:*: vpxodb:network:*: vpxsapr3:network:*: wa:network:*: xoq:olap:
For example, if your facility is bbed then the corresponding message file (ascii) is bbedus.msg, which is located under “rdbms” component per facility.lis mapping.
$ORACLE_HOME/rdbms/mesg/bbedus.msg
The message file $ORACLE_HOME/rdbms/mesg/oraus.msg also contains the Pseudo-error debugging events (Error codes 10000 .. 10999 are reserved for debug event codes that are not really errors.) also known as undocumented events, brief description available for many of these events within oraus.msg file (starting at line # 17272, file shipped with 10gR2 10.2.0.4). You can find a complete list of undocumented parameters in my other post.