Wednesday, December 18, 2013

ORA-00301 and ORA-27038

If you try to add a member to a redo log group, and the file already exists at the UNIX level,
you get an ORA-00301 and an ORA-27038:
 
SQL> select group#, member from v$logfile;
 
    GROUP# MEMBER
---------- ----------------------------------------
         2 /disk1/redo/log2a.rdo
         1 /disk1/redo/log1a.rdo
         1 /disk2/redo/log1b.rdo
 
SQL> alter database add logfile member
  2  '/disk2/redo/log2b.rdo'
  3  to group 2;
alter database add logfile member
*
ERROR at line 1:
ORA-00301: error in adding log file
'/disk2/redo/log2b.rdo' - file cannot be
created
ORA-27038: skgfrcre: file exists
 
SQL>
 
If you specify the reuse option, the error message does not appear:
 
SQL> alter database add logfile member
  2  '/disk2/redo/log2b.rdo'
  3  reuse to group 2;
 
Database altered.
 
SQL> select group#, member from v$logfile;
 
    GROUP# MEMBER
---------- ----------------------------------------
         2 /disk1/redo/log2a.rdo
         1 /disk1/redo/log1a.rdo
         1 /disk2/redo/log1b.rdo
         2 /disk2/redo/log2b.rdo
 
SQL>

No comments: