-: For Single Instance :-Dropping Online Redo log groups - Single Instance: #Groups to be dropped are group#11, group#12, group#13, group#14. SQL> set lines 300 pages 3000 SQL> col member for a70 SQL> select group#,type,member from v$logfile order by 1; GROUP# TYPE MEMBER ------ ------- ----------------------------------------------- 1 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO1.LOG 2 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO2.LOG 3 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO3.LOG 11 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO11.LOG 12 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO12.LOG 13 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO13.LOG 14 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO14.LOG SQL> alter database drop logfile group 11, group 12, group 13, group 14; Database altered. SQL> select group#,status,type,member from v$logfile order by 1; GROUP# TYPE MEMBER ------ ------- ---------------------------------------------- 1 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO1.LOG 2 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO2.LOG 3 ONLINE D:\RUPESH\SETUPS\TEST\TEST\ONLINELOG\REDO3.LOG Dropping Standby Redo Log groups - Single Instance: #Groups to be dropped are group#6 and group#7. SQL> select group#,type,member from v$logfile where type='STANDBY' order by 1; GROUP# TYPE MEMBER ------ ------- --------------------------------------------- 4 STANDBY D:\RUPESH\SETUPS\TEST\TEST\SRLS\STANDBY01.LOG 5 STANDBY D:\RUPESH\SETUPS\TEST\TEST\SRLS\STANDBY02.LOG 6 STANDBY D:\RUPESH\SETUPS\TEST\TEST\SRLS\STANDBY03.LOG 7 STANDBY D:\RUPESH\SETUPS\TEST\TEST\SRLS\STANDBY04.LOG SQL> alter database drop logfile group 6, group 7; Database altered. OR SQL> alter database drop standby logfile group 6, group 7; Database altered. SQL> select group#,type,member from v$logfile where type='STANDBY' order by 1; GROUP# TYPE MEMBER ------ ------- --------------------------------------------- 4 STANDBY D:\RUPESH\SETUPS\TEST\TEST\SRLS\STANDBY01.LOG 5 STANDBY D:\RUPESH\SETUPS\TEST\TEST\SRLS\STANDBY02.LOG -: For RAC - Real Application Clusters :-Dropping Online Redo log groups - RAC: SQL> alter database drop logfile group 21, group 22, group 23; Database altered. Dropping Standby Redo Log groups - RAC: SQL> alter database drop logfile group 21, group 22, group 23; Database altered. OR SQL> alter database drop standby logfile group 21, group 22, group 23; Database altered. |
Dropping redo log groups in one command in Oracle database
April 13, 2024
0
Thank you for your comment !