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

本站中文解释

Oracle视图V$LOGSTDBY_STATE用于显示日志应用状态,可以查看当前的状态,帮助数据库用户查看数据库里的日志应用的信息。

V$LOGSTDBY_STATE视图可以用来查看日志传输状态,里面包含四列是:THREAD#,STATUS,SEQUENCE#和BLOCK#, THREAD#可以查看是第几个线程调用的,STATUS可以查看状态是否被激活,SEQUENCE#是制定的位置 STATUS,BLOCK#是取自SEQUENCE#中的状态块。可以根据这些列查看日志传输状态,从而掌握数据库里日志传输的情况。

使用方法:

要查看日志传输状态,可以使用如下SQL语句:

SELECT * from v$logstdby_state;

这就可以查看日志传输的状态,从而观察日志传输的情况,帮助数据库用户掌握数据库状态。

官方英文解释

V$LOGSTDBY_STATE provides consolidated information from V$LOGSTDBY and V$LOGSTDBY_STATS about the running state of Logical Standby.

Column Datatype Description

PRIMARY_DBID

NUMBER

Database ID (DBID) of the primary database

PRIMARY_CON_DBID

NUMBER

This column indicates the DBID of the source database or source PDB corresponding to the database (or CDB) from which this column is queried.For a non-CDB and the root of a CDB, this column matches the PRIMARY_DBID column.For a maintained PDB, this column indicates the DBID for the corresponding PDB at the source.For a skipped PDB or a local PDB, this column would be NULL.

SESSION_ID

NUMBER

LogMiner session ID allocated to SQL Apply.

REALTIME_APPLY

VARCHAR2(64)

Y indicates that SQL Apply is running in real-time apply mode. If a standby redo log is configured, SQL Apply applies changes as they are written to the standby redo log files. N indicates that SQL Apply applies changes as each archived redo log file is received.

STATE

VARCHAR2(64)

  • INITIALIZING: LogMiner session has been created and coordinator has attached to it

  • LOADING DICTIONARY: SQL Apply is loading the LogMiner dictionary

  • WAITING ON GAP: SQL Apply is waiting for a log file to be sent from the primary database

  • APPLYING: SQL Apply is actively mining or applying transactions

  • WAITING FOR DICTIONARY LOGS: SQL Apply is waiting for the archived logs containing the LogMiner dictionary to be shipped from the primary database

  • IDLE: SQL Apply has applied all changes available at the logical standby, and is caught up with the primary database

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

See Also:

  • “V$LOGSTDBY”

  • “V$LOGSTDBY_STATS”


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