1) Check the status of redo logs
SQL> select group#,thread#,members,status from v$log;
GROUP# THREAD# MEMBERS STATUS
---------- ---------- ---------- ----------------
1 1 2 INACTIVE
2 1 2 CURRENT
3 2 2 CURRENT
4 2 2 INACTIVE
2) Add the redo log Group 5 and 6
SQL> alter database add logfile thread 1 group 5 ('+DATA','+FRA') size 1024M;
Database altered.
SQL>
SQL> alter database add logfile thread 1 group 6 ('+DATA','+FRA') size 1024M;
Database altered.
SQL>
SQL> select group#,thread#,members,status from v$log;
GROUP# THREAD# MEMBERS STATUS
---------- ---------- ---------- ----------------
1 1 2 INACTIVE
2 1 2 CURRENT
3 2 2 CURRENT
4 2 2 INACTIVE
5 1 2 UNUSED
6 1 2 UNUSED
6 rows selected.
Note : You can drop inactive redo log group but not CURRENT and ACTIVE.
SQL> Alter database drop logfile group 1;
Database altered.
SQL> alter database add logfile thread 2 group 7 ('+DATA','+FRA') size 1024M;
Database altered.
SQL> alter database add logfile thread 2 group 8 ('+DATA','+FRA') size 1024M;
Database altered.
SQL> select group#,thread#,members,status from v$log;
GROUP# THREAD# MEMBERS STATUS
---------- ---------- ---------- ----------------
1 1 2 INACTIVE
2 1 2 CURRENT
3 2 2 CURRENT
4 2 2 INACTIVE
2) Add the redo log Group 5 and 6
SQL> alter database add logfile thread 1 group 5 ('+DATA','+FRA') size 1024M;
Database altered.
SQL>
SQL> alter database add logfile thread 1 group 6 ('+DATA','+FRA') size 1024M;
Database altered.
SQL>
SQL> select group#,thread#,members,status from v$log;
GROUP# THREAD# MEMBERS STATUS
---------- ---------- ---------- ----------------
1 1 2 INACTIVE
2 1 2 CURRENT
3 2 2 CURRENT
4 2 2 INACTIVE
5 1 2 UNUSED
6 1 2 UNUSED
6 rows selected.
Note : You can drop inactive redo log group but not CURRENT and ACTIVE.
SQL> Alter database drop logfile group 1;
Database altered.
SQL> alter database add logfile thread 2 group 7 ('+DATA','+FRA') size 1024M;
Database altered.
SQL> alter database add logfile thread 2 group 8 ('+DATA','+FRA') size 1024M;
Database altered.
No comments:
Post a Comment