zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

Oracle oerr工具介绍

Oracle工具 介绍
2023-09-27 14:28:38 时间

(1)什么是oerr

oerr是Oracle提供的在UNIX/Linux上查看Oracle错误的小工具,使用起来非常方便。

(2)如何使用

oerr工具位于ORACLE_HOME下面,可以使用which查看

[oracle@redhat6 ~]$ which oerr
/u01/app/oracle/product/11.2.0/db_1/bin/oerr

使用oerr查看Oracle的报错信息及解决方案

例子1.使用oerr查看ORA-00060错误的原因及解决方案

[oracle@redhat6 ~]$ oerr ora 60
00060, 00000, "deadlock detected while waiting for resource"
// *Cause :  Transactions deadlocked one another while waiting for resources.
// *Action: Look at the trace file to see the transactions and resources
//          involved. Retry if necessary.

例子2.使用oerr查看ORA-01502错误的原因及解决方案

[oracle@redhat6 ~]$ oerr ora 01502
01502, 00000, "index '%s.%s' or partition of such index is in unusable state"
// MERGE: 1489 RENUMBERED TO 1502
// *Cause: An attempt has been made to access an index or index partition
//         that has been marked unusable by a direct load or by a DDL
//         operation
// *Action: DROP the specified index, or REBUILD the specified index, or
//         REBUILD the unusable index partition