SQL> col name for a40
SQL> set pagesize 200
SQL> r
1* select l.group#,l.sequence#,f.member as name,l.status,l.archived from v$log l,v$logfile f where f.group#=l.group#
GROUP# SEQUENCE# NAME STATUS
---------- ---------- ---------------------------------------- ----------------
ARC
---
3 3 /u01/app/oracle/oradata/metro/redo03.log INACTIVE
YES
2 7 /u01/app/oracle/oradata/metro/redo02.log CURRENT
NO
SQL> select l.group#,l.sequence#,f.member as name,l.status,l.archived from v$log l,v$logfile f where f.group#=l.group#;
--日志组处于active状态,存在脏块没有写完,暂不可删除日志组2
GROUP# SEQUENCE# NAME STATUS ARC
---------- ---------- ---------------------------------------- ---------------- ---
2 7 /u01/app/oracle/oradata/metro/redo02.log ACTIVE YES
4 8 +DATA/metro/onlinelog/group_4.274.848866 CURRENT NO
125
6 6 +DATA/metro/onlinelog/group_6.276.848866 INACTIVE YES
215
SQL> r
1* select l.group#,l.sequence#,f.member as name,l.status,l.archived from v$log l,v$logfile f where f.group#=l.group#
--几分钟后,再次查看日志状态,日志组2已经将脏块写完,此时可以删除该日志组了
GROUP# SEQUENCE# NAME STATUS ARC
---------- ---------- ---------------------------------------- ---------------- ---
2 7 /u01/app/oracle/oradata/metro/redo02.log INACTIVE YES
4 8 +DATA/metro/onlinelog/group_4.274.848866 CURRENT NO
125