In today’s article, we will be learning how to Delete Redo Log Member in oracle.
When deleting a member from a group, we must check if its status is CURRENT.
1 2 3 4 5 6 7 8 |
SQL> select group#, members,status from v$log; GROUP# MEMBERS STATUS ---------- ---------- ---------------- 1 2 INACTIVE 2 1 INACTIVE 3 1 CURRENT 4 1 INACTIVE |
We learn the data file of the member to be deleted.
1 2 3 4 5 6 7 |
SQL> select group#, member from v$logfile where group#=1; GROUP# MEMBER ---------- -------------------------------------------------------------------------------- 1 /u01/app/oracle/oradata/traindb/redo01.log 1 /u01/app/oracle/oradata/traindb/redo01b.log |
Now we can delete the member.
1 2 3 |
SQL> alter database drop logfile member '/u01/app/oracle/oradata/traindb/redo01b.log' ; Database altered. |
Let’s check if the member has been deleted.
1 2 3 4 5 6 7 8 |
SQL> select group#, members,status from v$log; GROUP# MEMBERS STATUS ---------- ---------- ---------------- 1 1 INACTIVE 2 1 INACTIVE 3 1 CURRENT 4 1 INACTIVE |