Causa
Erro ao dropar redo instance migrada de Rac para Single
SYS@OLTP> alter database drop logfile group 10;
alter database drop logfile group 10
*
ERROR at line 1:
ORA-01567: dropping log 10 would leave less than 2 log files for instance oltp2 (thread 2)
ORA-00312: online log 10 thread 2: ‘/u01/oracle/oradata/OLTP/redo_10.log’
Consultando Group Redo / Threads
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
SQL> select thread#, group#, members,FIRST_CHANGE#, bytes/1024/1024, status from v$log; THREAD# GROUP# MEMBERS FIRST_CHANGE# BYTES/1024/1024 STATUS ------- ---------- ---------- ------------- --------------- -------- 1 1 1 8.1348E+10 300 CURRENT 1 2 1 8.1348E+10 300 ACTIVE 1 3 1 8.1348E+10 300 ACTIVE 1 4 1 8.1348E+10 300 ACTIVE 1 5 1 8.1348E+10 300 ACTIVE 2 6 1 8.1153E+10 400 INACTIVE 1 7 1 8.1348E+10 300 ACTIVE 1 8 1 8.1348E+10 300 ACTIVE 1 9 1 8.1348E+10 300 ACTIVE 2 10 1 0 400 UNUSED |
Consultando as threads
1 2 3 4 5 6 |
SYS@OLTP > select thread#,status from v$thread; THREAD# STATUS ---------- ------ 1 OPEN 2 CLOSED |
Nesse caso como a instance é uma Single faz sentido a THREAD 2 status CLOSED
Desativando a Thread 2
1 2 3 |
SYS@OLTP > alter database disable thread 2; Database altered. |
Dropando os redos da Thred 2
1 2 3 4 5 6 7 8 |
13:17:19 SYS@OLTP > alter database drop logfile group 10; Database altered. Elapsed: 00:00:00.04 13:17:28 SYS@OLTP > alter database drop logfile group 6; Database altered. |
Obs.: Lembrar de excluir o redo fisicamente no Filesystem/ ASM