v$log_v$logfile監控日誌檔案logfile切換及相關資訊_status

wisdomone1發表於2010-08-07

SQL> select a.group#,a.bytes/1024/1024 mb,b.member,a.status from v$log a,v$logfile b where a.group#=b.group# order by a.group#;

    GROUP#         MB MEMBER                                             STATUS
---------- ---------- -------------------------------------------------- ----------------
         4        200 /oracle/oradata/orcl/redo04.log                    INACTIVE
         5        200 /oracle/oradata/orcl/redo05.log                    INACTIVE
         6        200 /oracle/oradata/orcl/redo06.log                    INACTIVE
         7        200 /oracle/oradata/orcl/redo07.log                    ACTIVE
         8        200 /oracle/oradata/orcl/redo08.log                    CURRENT

轉錄一點關於v$logfile及v$log的status列值講解:

 

這兩個狀態很容易混淆,今天進行了整理,放入BLOG,以便以後查閱並希望能幫助大家理清兩個狀態的不同!

1.V$LOGFILE.STATUS
   ()
  型別:VARCHAR2(7)
  Status of the log member:
  1.INVALID - File is inaccessible(檔案不可訪問)
  2.STALE - File's contents are incomplete(表明該檔案內容不完全,例如正在新增一個日誌檔案成員)
   If the redo log file group member has never been used,
   either due to a new redo log file group or a repaired member,
   the value of STATUS is STALE until the log file member is used
   to record redo information.
  3.DELETED - File is no longer used(該檔案已不再使用)
  4.null - File is in use(檔案正在使用中)
 
1.V$LOG.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 redo log時RESETLOGS操作後的狀態)
  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.
                     (表明在ALTER DATABASE CLEAR LOGFILE 命令後正在將該日誌重建為一個
                     空日誌,日誌清除後其狀態更改為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.
                      (表明正在清除當前日誌檔案中的已關閉執行緒,如果切換時發生某些故障,
                         如寫入新日誌標題時的I/O錯誤,則該日誌可以停留在該狀態。)

  INACTIVE - Log is no longer needed for instance recovery. It may be in use for
                    media recovery. It might or might not be archived.
                    (表明例程恢復不再需要聯機重做日誌組,它可能已經歸檔也可能未歸檔。)
 

 

本文來自CSDN部落格,轉載請標明出處:http://blog.csdn.net/zhpsam109/archive/2007/12/07/1922982.aspx

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-670477/,如需轉載,請註明出處,否則將追究法律責任。

相關文章