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

本站中文解释

Oracle视图DBA_LOGSTDBY_LOG是 Oracle数据库提供的一种视图,它可以管理、查询、跟踪物理日志文件维护在延迟复制环境中用户操作日志文件的状态信息。

使用方法:
1. 查询相关日志文件状态:
SELECT LOG_ID,
LOG_STATUS,
LOG_APPLIED,
LOG_APPLIED_THRU
FROM DBA_LOGSTDBY_LOG;

2. 查看日志文件当前的状态:
SELECT LOG_ID,
LOG_STATUS,
LOG_APPLIED,
LOG_APPLIED_THRU
FROM DBA_LOGSTDBY_LOG
WHERE LOG_STATUS = ‘CURRENT’;

3. 确定延迟的事务日志ID:
SELECT LOG_ID
FROM DBA_LOGSTDBY_LOG
WHERE LOG_APPLIED = ‘NO’
AND LOG_STATUS = ‘REQUIRED’;

4. 确定已经被广播的事务日志:
SELECT LOG_ID
FROM DBA_LOGSTDBY_LOG
WHERE LOG_STATUS = ‘BROADCAST’;

5. 查询应用到本地上的事务日志:
SELECT LOG_ID
FROM DBA_LOGSTDBY_LOG
WHERE LOG_APPLIED = ‘YES’
AND LOG_APPLIED_THRU IS NOT NULL;

官方英文解释

DBA_LOGSTDBY_LOG displays information about the logs registered for a logical standby database.

This view is for logical standby databases only.

Column Datatype NULL Description

THREAD#

NUMBER

NOT NULL

Thread ID of the archive log. The THREAD number is 1 for a single instance. For Real Application Clusters, this column will contain different numbers.

RESETLOGS_CHANGE#

NUMBER

NOT NULL

Start SCN of the branch

RESETLOGS_ID

NUMBER

NOT NULL

Resetlogs identifier (a numeric form of the timestamp of the branch)

SEQUENCE#

NUMBER

NOT NULL

Sequence number of the archive log file

FIRST_CHANGE#

NUMBER

NOT NULL

System change number (SCN) of the current archive log

NEXT_CHANGE#

NUMBER

SCN of the next archive log

FIRST_TIME

DATE

Date of the current archive log

NEXT_TIME

DATE

Date of the next archive log

FILE_NAME

VARCHAR2(513)

Name of the archive log

TIMESTAMP

DATE

Time when the archive log was registered

DICT_BEGIN

VARCHAR2(3)

Indicates whether the beginning of the dictionary build is in this archive log (YES) or not (NO)

DICT_END

VARCHAR2(3)

Indicates whether the end of the dictionary build is in this archive log (YES) or not (NO)

APPLIED

VARCHAR2(8)

Indicates primarily whether a given foreign archived log has been applied fully by SQL Apply:

  • YES – SQL Apply has fully applied the foreign archived log and no longer needs it

  • CURRENT – SQL Apply is currently applying changes contained in the foreign archived log

  • NO – SQL Apply has not started applying any changes contained in the foreign archived log

  • FETCHING – SQL Apply encountered a corruption while reading redo records from this foreign archived log, and is currently using the automatic gap resolution to refetch a new copy of the log from the primary database

  • CORRUPT – SQL Apply encountered a corruption while reading redo records from this foreign archived log, and refetching a new copy of the archived log did not resolve the problem. SQL Apply will not refetch a new copy of this archived log automatically, and will require user intervention to manually register a new copy of the foreign archived log.

BLOCKS

NUMBER

Number of blocks in the log

BLOCK_SIZE

NUMBER

Size of each block in the log

Note:

The SCN values in this view correlate to the SCN values shown in the DBA_LOGSTDBY_PROGRESS view.

Note:

In a CDB, this view shows data only when queried in the root.


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