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

本站中文解释

MNR_CONTENTS

Oracle视图V$LOGMNR_CONTENTS是Oracle LogMiner的日志查看视图,用于查看LogMiner日志,以显示LogMiner在执行过程中发生的事件。这个视图提供了一个用于查看LogMiner数据的框架,但是查看LogMiner日志的详细信息需要从其他视图(如V$LOGMNR_LOGS)中获取。

使用方法:

1. 首先要连接到Oracle数据库,使用sqlplus登录并使用dba组的权限。

2. 使用以下语句开始LogMiner的工作:

EXEC DBMS_LOGMNR.START_LOGMNR(STARTTIME=>sysdate);

3. 使用以下语句查看V$LOGMNR_CONTENTS视图:

SELECT * FROM v$logmnr_contents;

4. 查看V$LOGMNR_CONTENTS视图会显示执行logMiner操作发生的事件类型、数据库中发生此事件的时间、此事件所做更改的表名以及该事件对该表的影响。

官方英文解释

V$LOG displays log file information from the control file.

Column Datatype Description

GROUP#

NUMBER

Log group number

THREAD#

NUMBER

Log thread number

SEQUENCE#

NUMBER

Log sequence number

BYTES

NUMBER

Size of the log (in bytes)

BLOCKSIZE

NUMBER

Block size of the logfile (512 or 4096)

MEMBERS

NUMBER

Number of members in the log group

ARCHIVED

VARCHAR2(3)

Archive status (YES) or (NO)

STATUS

VARCHAR2(16)

Log status:

  • UNUSED – Online redo log has never been written to. This is the state of a redo log that was just added, or just after a RESETLOGS, when it is not the current redo log.

  • CURRENT – Current redo log. This implies that the redo log is active. The redo log could be open or closed.

  • ACTIVE – Log is active but is not the current log. It is needed for crash recovery. It may be in use for block recovery. It may or may not be archived.

  • CLEARING – Log is being re-created as an empty log after an ALTER DATABASE CLEAR LOGFILE statement. After the log is cleared, the status changes to UNUSED.

  • CLEARING_CURRENT – Current log is being cleared of a closed thread. The log can stay in this status if there is some failure in the switch such as an I/O error writing the new log header.

  • INACTIVE – Log is no longer needed for instance recovery. It may be in use for media recovery. It may or may not be archived.

FIRST_CHANGE#

NUMBER

Lowest system change number (SCN) in the log

FIRST_TIME

DATE

Time of the first SCN in the log

NEXT_CHANGE#

NUMBER

Highest change number (SCN) in the log

When STATUS=CURRENT, NEXT_CHANGE# is set to the highest possible SCN, 9295429630892703743.

NEXT_TIME

DATE

Time of the highest SCN in the log. When STATUS=CURRENT, NEXT_TIME is set to NULL.

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