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

本站中文解释

的用途和使用

Oracle V$LOGHIST视图主要用于查询有关日志归档历史信息的信息,并可将其显示在控制台或者脚本中。V$LOGHIST视图可以查询归档日志数量、归档日志文件名、归档时间、归档内容和每块归档日志的尺寸、SCN和更新时间等等,提供了有关数据库日志信息的完整信息。

使用示例:

查询最近的5块归档日志文件的归档时间:

SELECT TO_CHAR(FIRST_TIME, ‘YYYY-MM-DD HH24:MI:SS’) FIRST_TIME, SEQUENCE#, THREAD#
FROM V$LOGHIST
ORDER BY SEQUENCE# DESC
WHERE SEQUENCE#

官方英文解释

V$LOGHIST contains log history information from the control file. This view is retained for historical compatibility. Oracle recommends that you use V$LOG_HISTORY instead.

See Also:

“V$LOG_HISTORY”

Column Datatype Description

THREAD#

NUMBER

Log thread number

SEQUENCE#

NUMBER

Log sequence number

FIRST_CHANGE#

NUMBER

Lowest SCN in the log

FIRST_TIME

DATE

Time of first SCN in the log

SWITCH_CHANGE#

NUMBER

SCN at which the log switch occurred; one more than highest SCN in the log

CON_ID

NUMBER

The ID of the container to which the data pertains. Possible values include:

  • 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs.

  • 1: This value is used for rows containing data that pertain to only the root

  • n: Where n is the applicable container ID for the rows containing data


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