ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 转 [笔记]解析v$log/v$logfile中status列值的含义

转 [笔记]解析v$log/v$logfile中status列值的含义

原创 Linux操作系统 作者:hbm1985 时间:2012-02-12 11:18:04 0 删除 编辑

原文 http://space.itpub.net/6906/viewspace-21607

解析v$log/v$logfile中status列值的含义.


查询v$log获得联机
重做日志文件组的信息

下面的项是v$log视图中STATUS 列的常见值:
UNUSED  表明从未对联机重做日志组进行写入,这是刚添加的联机重做日志文件的状态。
CURRENT  表明当前的联机重做日志组,这意味着该联机重做日志组是活动的。
ACTIVE  表明联机重做日志组是活动的,但是并非当前联机重做日志组,崩溃恢复需要该状态它可能正用于块恢复,它可能归档也可能不归档。
CLEARING  表明在ALTER DATABASE CLEAR LOGFILE 命令后正在将该日志重建为一个空日志,日志清除后其状态更改为UNUSED。
CLEARING_CURRENT  表明正在清除当前日志文件中的已关闭线程,如果切换时发生某些故障,如写入新日志标题时的I/O错误,则该日志可以停留在该状态。
INACTIVE  表明例程恢复不再需要联机重做日志组,它可能归档也可能不归档。

查询V$LOGFILE获取日志成员信息

下面的项是v$logfile 视图中STATUS 列的常见值:
INVALID  表明该文件不可访问。
STALE  表明该文件内容不完全,例如正在添加一个日志文件成员。
DELETED  表明该文件已不再使用。
null(原文为"空白")表明文件正在使用中。

以下是个人补充的资料

官方说明:
 PS:10G R1

V$LOG

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)
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 might or might not be archived.

  • INVALIDATED - Archived the current redo log without a log switch.

FIRST_CHANGE# NUMBER Lowest system change number (SCN) in the log
FIRST_TIME DATE Time of the first SCN in the log

V$LOGFILE

This view contains information about redo log files.

Column Datatype Description
GROUP# NUMBER Redo log group identifier number
STATUS VARCHAR2(7) Status of the log member:
  • INVALID - File is inaccessible

  • STALE - File's contents are incomplete

  • DELETED - File is no longer used

  • null - File is in use

TYPE VARCHAR2(7) Type of the logfile:
  • ONLINE

  • STANDBY

MEMBER VARCHAR2(513) Redo log member name
IS_RECOVERY_DEST_FILE VARCHAR2(3) Indicates whether the file was created in the flash recovery area (YES) or not (NO)


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/18760228/viewspace-716085/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-02-22

  • 博文量
    25
  • 访问量
    65677