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 ID of the archive log. The THREAD number is |
|
|
|
Start SCN of the branch |
|
|
|
Resetlogs identifier (a numeric form of the timestamp of the branch) |
|
|
|
Sequence number of the archive log file |
|
|
|
System change number (SCN) of the current archive log |
|
|
SCN of the next archive log |
|
|
|
Date of the current archive log |
|
|
|
Date of the next archive log |
|
|
|
Name of the archive log |
|
|
|
Time when the archive log was registered |
|
|
|
Indicates whether the beginning of the dictionary build is in this archive log ( |
|
|
|
Indicates whether the end of the dictionary build is in this archive log ( |
|
|
|
Indicates primarily whether a given foreign archived log has been applied fully by SQL Apply:
|
|
|
|
Number of blocks in the log |
|
|
|
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.