跟踪事件(转帖)和linux-oerr

本文提供了一个PL/SQL代码示例,用于输出Oracle数据库中特定范围内的错误消息,并介绍了一个实用的命令行工具oerror,帮助快速查询Oracle错误信息。

看到一篇文章,输出tracing events,在此记录。<!--more-->
[sql]declare
err_msg VARCHAR2(120);
BEGIN
dbms_output.enable(1000000);
FOR err_num IN 10000 .. 10999 LOOP
err_msg := SQLERRM(-err_num);
IF err_msg NOT LIKE '%Message ' || err_num || ' not found%' THEN
dbms_output.put_line(err_msg);
END IF;
END LOOP;
END;[/sql]
另外记录下自己老是会忘记的一个linux下的查询oracle错误command,有了这个command,就不用老是去查找手册了。
[oracle@crmdb2 ~]$ oerr ora-1
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.
[oracle@crmdb2 ~]$ oerr ora 10046
10046, 00000, "enable SQL statement timing"
// *Cause:
// *Action:
[oracle@crmdb2 ~]$ oerr ora 03114
03114, 00000, "not connected to ORACLE"
// *Cause:
// *Action:
[oracle@crmdb2 ~]$
-The End-

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值