1) ADD REDO LOGS :-
To add redo log groups in RAC use below commands.
ALTER DATABASE ADD LOGFILE THREAD 1
GROUP 1 ('+REDO/db_name/redo__t1_01a.log','+REDO/db_name/redo__t1_01b.log') SIZE 100m,
GROUP 2 ('+REDO/db_name/redo__t1_02a.log','+REDO/db_name/redo__t1_02b.log') SIZE 100m,
GROUP 3 ('+REDO/db_name/redo__t1_03a.log','+REDO/db_name/redo__t1_03b.log') SIZE 100m,
GROUP 4 ('+REDO/db_name/redo__t1_04a.log','+REDO/db_name/redo__t1_04b.log') SIZE 100m;
ALTER DATABASE ADD LOGFILE THREAD 2
GROUP 5 ('+REDO/db_name/redo__t2_5a.log','+REDO/db_name/redo__t2_5b.log') SIZE 100m,
GROUP 6 ('+REDO/db_name/redo__t2_6a.log','+REDO/db_name/redo__t2_6b.log') SIZE 100m,
GROUP 7 ('+REDO/db_name/redo__t2_7a.log','+REDO/db_name/redo__t2_7b.log') SIZE 100m,
GROUP 8 ('+REDO/db_name/redo__t2_8a.log','+REDO/db_name/redo__t2_8b.log') SIZE 100m;
2) DROP REDO LOGS :-
Before Dropping the logfiles check that those logfile groups are not active or current, they should be inactive or unused.
SQL> select group#,thread#,members,status from v$log;
GROUP# THREAD# MEMBERS STATUS
---------- ---------- ---------- ----------------
1 1 2 INACTIVE
2 1 2 INACTIVE
3 1 2 CURRENT
4 1 2 INACTIVE
5 1 2 INACTIVE
6 2 2 INACTIVE
7 2 2 INACTIVE
8 2 2 CURRENT
9 2 2 INACTIVE
10 2 2 INACTIVE
If status of group# is Inactive or Unused use below command to drop the logfile.
SQL> Alter database drop logfile group 1;
3) REMOVE LOG FILES FROM ASM:-
If we are using ASM then we have to drop the file manually.
Identify the files to be dropped and then delete them in ASM.
$ sqlplus " /as sysasm"
SQL> ALTER DISKGROUP REDO DROP FILE '+REDO/db_name/redo02a.log';
SQL> ALTER DISKGROUP REDO DROP FILE '+REDO/db_name/redo01a.log';
SQL> ALTER DISKGROUP REDO DROP FILE '+REDO/db_name/redo03a.log';
SQL> ALTER DISKGROUP REDO DROP FILE '+REDO/db_name/redo04a.log';
No comments:
Post a Comment