Friday, 27 February 2015

Changing Redo Log to new disk group in ASM RAC

+++ Changing Redo Log location,This can be done by adding the new redo logs in the new disk group and dropping the old one.

Check current group and redologs.

select group#,thread#,members,status from v$log
++ Add the new redo logs for node-1
ALTER DATABASE ADD LOGFILE THREAD 1
GROUP 1 ('+BW_REDO_01','+BW_CONTROL_01') SIZE 512m,
GROUP 2 ('+BW_REDO_01','+BW_CONTROL_01') SIZE 512m,
GROUP 3 ('+BW_REDO_01','+BW_CONTROL_01') SIZE 512m,
GROUP 4 ('+BW_REDO_01','+BW_CONTROL_01') SIZE 512m;
++ Add the new redo logs for node-2
ALTER DATABASE ADD LOGFILE THREAD 2
GROUP 51 ('+BW_REDO_01','+BW_CONTROL_01') SIZE 512m,
GROUP 52 ('+BW_REDO_01','+BW_CONTROL_01') SIZE 512m,
GROUP 53 ('+BW_REDO_01','+BW_CONTROL_01') SIZE 512m,
GROUP 54 ('+BW_REDO_01','+BW_CONTROL_01') SIZE 512m;

select group#,thread#,members,status from v$log ;
alter system switch logfile;

++ Drop Old disk group Location 
Alter database drop logfile group 10;
Alter database drop logfile group 11;
Alter database drop logfile group 12;
Alter database drop logfile group 13;

+We can drop only when the redo group is in INACTIVE state,So we have to switch the redo to make the old redo as inactive.
ALTER SYSTEM ARCHIVE LOG CURRENT;
select group#,thread#,members,status from v$log where thread#=2;
Alter database drop logfile group 13;

Drop all the standby redo logfiles from old Diskgroup and add the to New Disk group if necessary. 
and all the members are moved to the new location.

select member from v$logfile;

1 comment:

AppsDBA said...

Would be nice to show old logs before changing!.