Oracle 视图 ALL_ERRORS 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图ALL_ERRORS定义了一个特定用户近期未处理的所有错误消息,其中包括影响数据库性能的消息。

用法:

使用ALL_ERRORS的目的是查询各种数据库错误,并根据具体情况正确处理这些错误。执行以下查询可以检索所有近期未处理的错误消息:

SELECT * FROM ALL_ERRORS;

可以使用SQL语句将查询结果保存到a文件中,以便以后使用:

SELECT * FROM ALL_ERRORS WHERE log_date > sysdate-3 INTO OUTFILE ‘/tmp/file.txt’;

官方英文解释

ALL_ERRORS describes the current errors on the stored objects accessible to the current user.

Related Views

  • DBA_ERRORS describes the current errors on all stored objects in the database.

  • USER_ERRORS describes the current errors on the stored objects owned by the current user. This view does not display the OWNER column.

Column Datatype NULL Description

OWNER

VARCHAR2(128)

NOT NULL

Owner of the object

NAME

VARCHAR2(128)

NOT NULL

Name of the object

TYPE

VARCHAR2(12)

Type of the object:

  • VIEW

  • PROCEDURE

  • FUNCTION

  • PACKAGE

  • PACKAGE BODY

  • TRIGGER

  • TYPE

  • TYPE BODY

  • LIBRARY

  • JAVA SOURCE

  • JAVA CLASS

  • DIMENSION

SEQUENCE

NUMBER

NOT NULL

Sequence number (for ordering purposes)

LINE

NUMBER

NOT NULL

Line number at which the error occurred

POSITION

NUMBER

NOT NULL

Position in the line at which the error occurred

TEXT

VARCHAR2(4000)

NOT NULL

Text of the error

ATTRIBUTE

VARCHAR2(9)

Indicates whether the error is an error (ERROR) or a warning (WARNING)

MESSAGE_NUMBER

NUMBER

Numeric error number (without any prefix)

See Also:

  • “DBA_ERRORS”

    “USER_ERRORS”


数据运维技术 » Oracle 视图 ALL_ERRORS 官方解释,作用,如何使用详细说明