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

本站中文解释

V$LOGMNR_LOGS是Oracle数据列字典视图,可以用来查找正在使用的日志文件以及日志文件之间的其他关联关系。此视图也能提供关于日志文件中事件的详细信息,例如:在何处发生了更改,以及多少条记录位于每个记录集。它可以帮助DBA监控并管理日志文件的使用。

使用V$LOGMNR_LOGS视图时,应首先确定正在使用的日志文件中的所有事件,这可以通过读取其文件名、活动状态,以及关联的记录集来完成。可以使用V$LOGMNR_LOGS视图查询这些信息,示例如下:

SELECT * FROM V$LOGMNR_LOGS;

此外,可以使用V$LOGMNR_LOGS视图检索可用日志文件和其他日志文件之间的相关信息,例如log_position、log_end之类。如果需要检查每个记录集里有多少记录,可以使用这种查询:

SELECT record_set_name, COUNT(*) FROM V$LOGMNR_LOGS GROUP BY record_set_name;

使用V$LOGMNR_LOGS视图可以建立数据库审计和日志管理,还可以根据需要定期清理或备份日志文件。

官方英文解释

V$LOGMNR_LOGS contains log information.

Column Datatype Description

LOG_ID

NUMBER

This column is deprecated.

FILENAME

VARCHAR2(512)

Name of the log file

LOW_TIME

DATE

Oldest date of any records in the file

HIGH_TIME

DATE

Most recent date of any records in the file

DB_ID

NUMBER

Database ID

DB_NAME

VARCHAR2(8)

Name of the database

RESET_SCN

NUMBER

Resetlogs SCN of the database incarnation that generated the log file

RESET_SCN_TIME

DATE

Resetlogs timestamp of the database incarnation that generated the log file

COMPATIBLE

VARCHAR2(17)

The setting of the database COMPATIBLE initialization parameter at the time the log file was generated

THREAD_ID

NUMBER

Thread number

THREAD_SQN

NUMBER

Thread sequence number

LOW_SCN

NUMBER

SCN allocated when log switched into

NEXT_SCN

NUMBER

SCN after this log. Low SCN of the next log.

DICTIONARY_BEGIN

VARCHAR2(3)

Indicates whether dictionary dumped to redo logs starts in this redo log (YES) or not (NO)

DICTIONARY_END

VARCHAR2(3)

Indicates whether dictionary dumped to redo logs ends in this redo log (YES) or not (NO)

TYPE

VARCHAR2(7)

Redo log file type:

  • ARCHIVED

  • ONLINE

BLOCKSIZE

NUMBER

Database block size

FILESIZE

NUMBER

Size of the redo file (in bytes)

INFO

VARCHAR2(32)

Informational message. A value of MISSING_LOGFILE will be assigned to a row entry where a needed log file is missing from the list of log files.

STATUS

NUMBER

Status of the redo log file:

  • 0 – Will be read

  • 1 – First to be read

  • 2 – Not needed

  • 4 – Missing log file

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$LOGMNR_LOGS 官方解释,作用,如何使用详细说明