OERR Utility

Não muito conhecido, porém útil, o Oracle Error(OERR) é um utilitário que compõe a instalação do produto Oracle nas plataformas Linux e Unix. É um shell script localizado no diretório $ORACLE_HOME/bin que permite pesquisar nos arquivos Oracle messages (.msg) e exibir a causa e a ação para os erros  pesquisados, como neste exemplo:

[oracle@orcl ~]$ export ORACLE_HOME=/u02/app/oracle/product/10.2/db_1
[oracle@orcl ~]$ oerr ora 1555
01555, 00000, "snapshot too old: rollback segment number %s with name \"%s\" too small"
// *Cause: rollback records needed by a reader for consistent read are
//         overwritten by other writers
// *Action: If in Automatic Undo Management mode, increase undo_retention
//          setting. Otherwise, use larger rollback segments
[oracle@orcl ~]$

Sua syntaxe é composta pelo facility(digamos “código”) e error(número do erro):


[oracle@orcl ~]$ oerr
Usage: oerr facility error

Facility is identified by the prefix string in the error message.
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.

O facility econtrado no $ORACLE_HOME/lib/facility.lis nada mais é que um arquivo texto que aponta a localização dos messages(.msg) para o componente especificado, vejamos:

[oracle@orcl ~]$ cat $ORACLE_HOME/lib/facility.lis | grep -i rman
rman:rdbms:*:

ou seja, o arquivo de mensagem do RMAN está em:

oerr0 OERR Utility

    $ORACLE_HOME/$Component/mesg/${Facility}us.msg)

[oracle@orcl ~]$ ll $ORACLE_HOME/rdbms/mesg/rmanus.msg
-rw-r--r-- 1 oracle dba 334691 Abr 19  2010 /u02/app/oracle/product/10.2/db_1/rdbms/mesg/rmanus.msg

Lista dos facility disponíveis no facility.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

E nos arquivos de mensagem (.msg) temos a causa e a ação para o erro pesquisado:

[oracle@orcl ~]$ cat $ORACLE_HOME/rdbms/mesg/rmanus.msg | grep -A 5 -n -i 0574
769:0574, 1, "rman aborting due to errors read/writing dbms_pipe"
770-// *Cause:  RMAN was run with input/output being sent to dbms_pipe.  An
771-//          error was encountered while reading from or writing to the pipe.
772-//          This error should be preceeded by information describing the error.
773-// *Action: RMAN terminates.  Refer to the cause/action for the preceding
774-//          errors.
[oracle@orcl ~]$ oerr rman 0574
0574, 1, "rman aborting due to errors read/writing dbms_pipe"
// *Cause:  RMAN was run with input/output being sent to dbms_pipe.  An
//          error was encountered while reading from or writing to the pipe.
//          This error should be preceeded by information describing the error.
// *Action: RMAN terminates.  Refer to the cause/action for the preceding
//          errors.

Para a plataforma Windows a Oracle não disponibilizou o utiliátio OERR, contudo podemos encontrar na Internet varios batchs que disponibilizam a mesma funcionalidade que o OERR Linux & Unix.

Encontrei um muito bom, desenvolvido por John Barrenechea que pode ser baixado clicando aqui.

Basta decompactar o arquivo “Oerr.rar” e executar o Oerr.exe, como na imagem abaixo:

oerr1 OERR Utility

Ou atraves do prompt ( executar >> cmd ):

oerr2 1024x323 OERR Utility

REFERÊNCIAS:

http://www.oracleutilities.com/OSUtil/oerr.html
http://www.toadworld.com/KNOWLEDGE/KnowledgeXpertforOracle/tabid/648/TopicID/TDT1/Default.aspx
http://blog.aristadba.com/?p=177

%name OERR Utility

Autor: Anderson Graf

Bacharel em Sistemas de Informação e MBA em Gestão de Banco de Dados Oracle. Entusiasta da tecnologia Oracle, ACE Associate ♠, autor em vários blogs e OTN. Consultor Oracle Senior na Exímio Soluções em TI

Envolvido em soluções de:
– Implementação, migração, gerenciamento e suporte a produtos Oracle, multiplataforma
– Monitoramento de ambientes 24×7
– Backup e Recovery
– Performance e Tuning
– Alta disponibilidade (HA) – RAC, Data Guard
– EM database/grid/cloud control
– Particionamento & Advanced Compression
– Oracle Engineered Systems – ODA, Exadata

Blog pessoal: http://www.andersondba.com.br
Articulista na Oracle Technology Network (OTN) – https://goo.gl/99R6yW
ACE Associate – https://goo.gl/MBB51b
Articulista GPO – http://profissionaloracle.com.br