Oracle日誌的狀態

來源:互聯網
上載者:User

Oracle資料庫日誌的狀態

我們通過查詢v$log視圖可可以看到日誌的狀態

SQL> select group#,ARCHIVED,status fromv$log;

 GROUP#  ARC  STATUS

----------   ---   ----------------

1                 NO CURRENT

2                 YES  INACTIVE

3                  YES  ACTIVE

 

current代表當前正在使用的記錄檔,該記錄檔是活動的,當我們進行恢複的時候current日誌是必須的。

active 代表活動的日誌狀態,該日誌可能完成歸檔,也可能沒有完成歸檔

inactive 代表非使用中,這樣的日誌在執行個體恢複的時候不需要但是在介質恢複的時候用的到

unused 代表該日誌可能是被剛剛添加進來的未被使用的

SQL> alter system switch logfile;

 

System altered.

 

SQL> select group#,ARCHIVED,status fromv$log;

 

   GROUP# ARC STATUS

---------- --- ----------------

        1 YES ACTIVE

        2 NO  CURRENT

        3 YES ACTIVE

 

SQL> alter system switch logfile;

 

System altered.

 

SQL> select group#,ARCHIVED,status fromv$log;

 

   GROUP# ARC STATUS

---------- --- ----------------

        1 YES ACTIVE

        2 YES ACTIVE

        3 NO  CURRENT

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.