暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Is there a Windows version of the oerr program?

2011-01-01
1001

The Oracle (tm) Users' Co-Operative FAQ

Is there a Windows version of the oerr program?


Author's name: Yong Huang

Author's Email: yong321@yahoo.com

Date written: 18th June 2001
Updated: 3rd November 2004

Oracle version(s): 8i to 10g

In UNIX, you type oerr ora 1234 to get a description and suggested action about the Oracle error 1234. Oracle does not provide this utility in Windows. What can you do?


The UNIX version oerr program is a shell script that reads the text files $ORACLE_HOME/*/mesg/*.msg, most notably $ORACLE_HOME/rdbms/oraus.msg. But the Windows version Oracle does not bundle this utility and does not have human-readable error message files; it only has the binary versions such as %ORACLE_HOME%\RDBMS\mesg\oraus.msb and its format is not published by Oracle. So you can't build your own program based on that. The following are alternatives in order of relevance to the question.

1. Yong Huang wrote a freeware Perl script Windows oerr that reads the Oracle documentation Error Message pages and returns the error description and suggested action. It generally requires installing Perl and Oracle documentation locally. Minimum installation requires the Error Message part of documentation and compiled version of the Perl script (so you don't need the Perl interpreter).

2. Several people made attempts to build oerr based on the UNIX message files. The only one we still have access to is Bill Pollack's ora-text at his site. It requires you to ftp oraus.msg under rdbms from UNIX to PC.

3. Inside SQL*Plus or PL/SQL, you can use the sqlerrm function. For example, in SQL*PLus, set serveroutput on. Then exec dbms_output.put_line(sqlerrm(-1555)). This does not need any extra installation but gives you very limited error description and only works for the ORA facility, of course the largest facility in Oracle.

4. William Rogge posted a message to an Oracle mailing list publishing an awk script that parses $ORACLE_HOME/rdbms/mesg/oraus.msg and loads its content into an Oracle table. Obviously this requires client access to the database server to get the error description. I can't find the author or his script any more.

Note that not all error descriptions are exactly the same between UNIX $ORACLE_HOME/rdbms/mesg/oraus.msg and the Error Message page of documentation. Try oerr pls 123 at the UNIX prompt and then look it up in documentation.


Further Reading: none



最后修改时间:2020-04-16 15:11:45
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论