您的位置:寻梦网首页编程乐园Java天地JSP 专辑JSP001 HTML 离线版
Java 天地
JSP001 HTML 离线版
论坛精华 >> Oracle 专栏 >> A 7-6 Obtaining Information About Groups and Members

由 macro 发布于: 2001-03-01 19:33

Thumbs up

To see the number of online redo log groups , the current log group, and the sequence number :

SQL> SELECT groups, current_group#, sequence#
2 FROM v$thread;

GROUPS CURRENT_GROUP# SEQUENCE#
---------- -------------- ----------
2 1 867


The following query returns information about the online redo log file from the control file:

SQL> SELECT group#, sequence#, bytes, members, status
2 FROM v$log;

GROUP# SEQUENCE# BYTES MEMBERS STATUS
---------- ---------- ---------- ---------- ----------------
1 867 512000 1 CURRENT
2 866 512000 1 INACTIVE

The following items are the most common values for the STATUS column:

1.UNUSED indicates that the online redo log group has never been written to .This is the state of an online redo log file that was just added.

2.CURRENT indicates the current redo log group.This implies that the online redo log group is active.

3.ACTIVE indicates that the online redo log group is active but is not the current online redo log group . It is needed for crash recovery.It may be in use for block recovery.It may not be archived.

4.CLEARING indicates the log is being re-created as an empty log after an ALTER DATABASE CLEAR LOGFILE command.After the log is created,the status changes to UNUSED.

5.CLEARING_CURRENT indicates that the current log file is being cleared of a closed thread.The log can stay in this status if there some failure in the switch,such as an I/O error writing the new log header.

6.INACTIVE indicates that the online redo log group is no longer needed for instance recovery .It may or may not be archived.
__________________

谢谢你抽时间看我的发言,

Macro Zeng

==================================

我正在学习 Oracle ,坚持每天写读书笔记


由 macro 发布于: 2001-03-01 19:41

To obtain the names of all the members of a group:

SQL> SELECT *
2 FROM v$logfile;

GROUP# STATUS MEMBER
---------- ------ ------

1 /opt/oracle/oradata/dbu80/redo01.log
2 /opt/oracle/oradata/dbu80/redo02.log

The value of the STATUS column could be one of the following:

1.INVALID indicates that the file is inaccessible
2.STALE indicates that contents of the file are incomplete;for example,adding a log file member.
3.DELETED indicates that the file is no longer used.
4.Blank indicates that the file is in use.



__________________

谢谢你抽时间看我的发言,

Macro Zeng

==================================

我正在学习 Oracle ,坚持每天写读书笔记



资料来源: JSP001.com