#Error while dropping less than two redo log groups. SQL> alter database drop logfile group 1; alter database drop logfile group 1 * ERROR at line 1: ORA-01567: dropping log 1 would leave less than 2 log files for instance test (thread 1) ORA-00312: online log 1 thread 1: 'D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO01.LOG' Cause: You can not drop all the groups and keep only one group. Minimum two redo log groups are required for the instance. Solution: Add more redo log groups and drop the existing ones if you want to drop it. #First check the status of the redo log group members. SQL> set lines 300 pages 3000 SQL> col member for a70 SQL> select group#,type,member from v$logfile order by 1; GROUP# TYPE MEMBER ------ ------- ----------------------------------------------- 1 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO01.LOG 2 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO02.LOG SQL> select group#,thread#,sequence#,members,archived,status from v$log order by 1; GROUP# THREAD# SEQUENCE# MEMBERS ARC STATUS ------ ------- ---------- ---------- --- -------- 1 1 121 1 YES INACTIVE 2 1 122 1 NO CURRENT #Add more redo log groups to drop existing ones. SQL> alter database add logfile group 3 'D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO3.log' size 200m; Database altered. SQL> select group#,type,member from v$logfile order by 1; GROUP# TYPE MEMBER ------ ------- ----------------------------------------------- 1 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO1.LOG 2 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO2.LOG 3 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO3.LOG SQL> alter system switch logfile; System altered. SQL> alter system switch logfile; System altered. SQL> alter system checkpoint; System altered. SQL> select group#,thread#,sequence#,members,archived,status from v$log order by 1; GROUP# THREAD# SEQUENCE# MEMBERS ARC STATUS ------ ---------- ---------- ---------- --- --------- 1 1 124 1 YES INACTIVE 2 1 125 1 YES INACTIVE 3 1 126 1 NO CURRENT SQL> alter database drop logfile group 1; Database altered. SQL> select group#,thread#,sequence#,members,archived,status from v$log order by 1; GROUP# THREAD# SEQUENCE# MEMBERS ARC STATUS ------ ---------- ---------- ---------- --- -------- 2 1 125 1 YES INACTIVE 3 1 126 1 NO CURRENT |
ORA-01567: dropping log 1 would leave less than 2 log files
April 13, 2024
0
Thank you for your comment !