查看日志文件组信息
sql> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARCHIVED STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME
---------- ---------- ---------- ---------- ---------- ---------- -------- ---------------- ------------- ----------- ------------ -----------
1 1 13 52428800 512 1 NO INACTIVE 21995736819 2017-9-21 9 21995740613 2017-9-21 1
2 1 14 52428800 512 1 NO CURRENT 21995740613 2017-9-21 1 281474976710
3 1 12 52428800 512 1 NO INACTIVE 21995708930 2017-9-21 7 21995736819 2017-9-21 9
sql> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE
---------- ------- ------- -------------------------------------------------------------------------------- ---------------------
3 ONLINE C:\ORACEL\BASE\ORADATA\ORCL\REDO03.LOG NO
2 ONLINE C:\ORACEL\BASE\ORADATA\ORCL\REDO02.LOG NO
1 ONLINE C:\ORACEL\BASE\ORADATA\ORCL\REDO01.LOG NO
新增日志组:
sql> alter database add logfile
2 ('C:\orcl1122\disk1\REDO04.LOG','C:\orcl1122\disk1\REDO05.LOG') size 50M;
Database altered
sql> select * from v$log
2 ;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARCHIVED STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME
---------- ---------- ---------- ---------- ---------- ---------- -------- ---------------- ------------- ----------- ------------ -----------
1 1 13 52428800 512 1 NO INACTIVE 21995736819 2017-9-21 9 21995740613 2017-9-21 1
2 1 14 52428800 512 1 NO CURRENT 21995740613 2017-9-21 1 281474976710
3 1 12 52428800 512 1 NO INACTIVE 21995708930 2017-9-21 7 21995736819 2017-9-21 9
4 1 0 52428800 512 2 YES UNUSED 0 0
sql> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE
---------- ------- ------- -------------------------------------------------------------------------------- ---------------------
3 ONLINE C:\ORACEL\BASE\ORADATA\ORCL\REDO03.LOG NO
2 ONLINE C:\ORACEL\BASE\ORADATA\ORCL\REDO02.LOG NO
1 ONLINE C:\ORACEL\BASE\ORADATA\ORCL\REDO01.LOG NO
4 ONLINE C:\ORCL1122\DISK1\REDO04.LOG NO
4 ONLINE C:\ORCL1122\DISK1\REDO05.LOG NO
删除日志组: sql> alter database drop logfile group 4;