Wednesday, March 29, 2017

Dropping redo log memmbers - oracle 11gR2



SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/appl/oradata/xdb01/CprodD/CprodD_redo03a.rdo
/appl/oradata/xdb02/CprodD/CprodD_redo03b.rdo
/appl/oradata/xdb01/CprodD/CprodD_redo02a.rdo
/appl/oradata/xdb02/CprodD/CprodD_redo02b.rdo
/appl/oradata/xdb01/CprodD/CprodD_redo01a.rdo
/appl/oradata/xdb02/CprodD/CprodD_redo01b.rdo

6 rows selected.

SQL> alter database drop logfile member '/appl/oradata/xdb02/CprodD/CprodD_redo03b.rdo';
alter database drop logfile member '/appl/oradata/xdb02/CprodD/CprodD_redo03b.rdo'
*
ERROR at line 1:
ORA-01609: log 3 is the current log for thread 1 - cannot drop members
ORA-00312: online log 3 thread 1:
'/appl/oradata/xdb01/CprodD/CprodD_redo03a.rdo'
ORA-00312: online log 3 thread 1:
'/appl/oradata/xdb02/CprodD/CprodD_redo03b.rdo'


The above can be deleted after switching the current log file.



SQL>  alter database drop logfile member '/appl/oradata/xdb02/CprodD/CprodD_redo02b.rdo';

Database altered.

SQL> alter database drop logfile member '/appl/oradata/xdb02/CprodD/CprodD_redo01b.rdo';

Database altered.

SQL> alter system checkpoint;

System altered.

SQL> alter system switch logfile;

System altered.

SQL>  alter database drop logfile member '/appl/oradata/xdb02/CprodD/CprodD_redo03b.rdo';

Database altered.

SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/appl/oradata/xdb01/CprodD/CprodD_redo03a.rdo
/appl/oradata/xdb01/CprodD/CprodD_redo02a.rdo
/appl/oradata/xdb01/CprodD/CprodD_redo01a.rdo

SQL>

1 comment:

  1. MGM Resorts (MGM) - The Official NJ Casino & Resort
    MGM Resorts (MGM) - 구미 출장샵 The Official NJ Casino 정읍 출장마사지 & Resort. 전라남도 출장안마 The MGM Resorts name 김제 출장마사지 reflects the spirit and 의왕 출장샵 history of the original casino resort Las Vegas.

    ReplyDelete