Maintain online redo log oracle database - enterprise edition - version 11.2.0.4 to 11.2.0.4 1. First look at the size of the current Redo log: [[email protected] ~]$ sqlplus / as sysdbaoracle database 10g enterprise edition release 10.2.0.1.0 - 64bit production sql> select group#, bytes, status from v$log; GROUP# bytes status---------- ---------- ---------------- 1 52428800 CURRENT 2 52428800 INACTIVE 3 52428800 inactive current redo log is 50M, now extended to 100m 2. View all Online day Group members sql> select group#, member from v$logfile; group# member---------- ---------- ---------------------------------------- 3 /oracle/ Oradata/orcl/redo03.log 2 /oracle/oradata/orcl/redo02.log 1 /oracle/oradata/orcl/redo01.log 3. newly added GROUP# 4/5/6 size 100M redolog &nbsP; sql> alter database add logfile group 4 '/oracle/oradata/orcl/ LOG4PROD.DBF ' size 100M; SQL> alter database add logfile group 5 '/ORACLE/ORADATA/ORCL/LOG5PROD.DBF ' size 100M; SQL> alter database add logfile group 6 '/oracle/oradata/orcl/log6prod.dbf ' size 100M; 4. querying the status of all current Redo log: sql> select group#, status from v$log; group# status---------- ---------------- 1 CURRENT 2 inactive 3 inactive 4 unused 5 UNUSED 6 UNUSED current Redolog status, Group 1 is the current online log group, group2, 3 for inactive, we want to delete is 50M group 1, 2, 3 group 1 is the current online log group, can not delete, can now delete inactive group 2, 3 sql> alter database drop logfile group 2; database altered. SQL> alter database drop logfile group 3; database altered. 5. multiple SWITCH log switch logs until group 1 is inactive status,: SQL> alter system checkpoint; System altered. SQL> alter system switch logfile; system altered. sql> select group#, status from v$log; GROUP# STATUS---------- ---------------- 1 inactive 4 UNUSED 5 UNUSED 6 UNUSED SQL> alter database drop logfile group 1; Database altered. Note: If checkpoint, or can not switch to inactive, then do a few global checkpoint sql> alter system checkpoint global; system altered 6. Check the online log again for allState: SQL> select group#, bytes, status from v$log; group# bytes status---------- ---------- ---------------- 4 104857600 inactive 5 104857600 CURRENT 6 104857600 unused 9. OS level delete old redolog [[email protected]  ORCL] $rm  /ORACLE/ORADATA/ORCL/REDO01.LOG[[EMAIL PROTECTED] ORCL] $RM /oracle/oradata/ ORCL/REDO02.LOG  [[EMAIL PROTECTED] ORCL] $rm /oracle/oradata/orcl/redo03.log 10. Delete redo log It is best to do a database backup, maintenance Reodlog best when the business low peak operation
This article is from the "O Record" blog, so be sure to keep this source http://evils798.blog.51cto.com/8983296/1420916