Tuesday, November 01, 2011

Adding Redo Log Group Members

You can use the alter database add logfile member command to add extra member(s) to a redo log group. You might do this:
 
(1)  To add an extra member on a different disk and remove a single point of failure.
(2)  In conjunction with the alter database drop logfile member, to move a redo log group from one disk to another.
 
You can tell Oracle where to add the new member by giving a group number:
 
SQL> select group#, member from v$logfile;
 
    GROUP# MEMBER
---------- ----------------------------------------
         2 /disk1/redo/log2a.rdo
         1 /disk1/redo/log1a.rdo
 
SQL> alter database add logfile member
  2  '/disk2/redo/log1b.rdo'
  3  to group 1;
 
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
 
SQL>
 
Or by providing the name(s) of the members already in the group:
 
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' to
  3  '/disk1/redo/log2a.rdo';
 
Database altered.
 
SQL> select group#, member from v$logfile
  2  order by 1, 2;
 
    GROUP# MEMBER
---------- ----------------------------------------
         1 /disk1/redo/log1a.rdo
         1 /disk2/redo/log1b.rdo
         2 /disk1/redo/log2a.rdo
         2 /disk2/redo/log2b.rdo
 
SQL>

No comments:

Post a Comment