SQL> alter database add logfile thread 1 group5 ('+ Data/myrac/onlinelog/myrac1_redolog_group5_01') size 100 m;
SQL> alter database add logfile member '+ Data/myrac/onlinelog/myrackets redolog_group5_02' to group 5;
SQL> alter database add logfile thread 2 group 6 ('+ Data/myrac/onlinelog/myrac1_redolog_group6_01') size 100 m;
Incorrect name added by mistake
Add members first
SQL> alter database add logfile member '+ Data/myrac/onlinelog/myrackets redolog_group6_02' to group 6;
SQL> alter database add logfile member '+ Data/myrac/onlinelog/myrackets redolog_group6_01' to group 6;
Cannot be deleted
SQL> alter database drop logfile member '+ Data/myrac/onlinelog/myrackets redolog_group6_01 ';
Alter database drop logfile member '+ Data/myrac/onlinelog/myrac1_redolog_group6_01'
*
Row 3 has an error:
ORA-00362: requires that a member be input to form a valid log file in group 6
ORA-01517: log Member: '+ DATA/myrac/onlinelog/myracw.redolog_group6_01'
The log status is not in use!
SQL> select group #, archived, status from v $ log;
GROUP # ARC STATUS
-----------------------------
1 NO ACTIVE
2 NO INACTIVE
3 NO CURRENT
4 NO INACTIVE
5 NO CURRENT
6 YES UNUSED
You have selected 6 rows.
Switch logs on node 2 instance 2 database instance
SQL> alter system switch logfile;
??????
SQL>/
GROUP # THREAD # SEQUENCE # bytes members arc status FIRST_CHANGE # FIRST_TIME
------------------------------------------------------------------------------------------------
1 1 87 52428800 1 no inactive 4427645 25-9 month-12
2 1 86 52428800 1 no inactive 4356268 25-9 month-12
3 2 43 52428800 1 no active 4402972 25-9 month-12
4 2 42 52428800 1 no inactive 4206757 24-9 month-12
5 1 88 104857600 2 no current 4495802 26-9 month-12
6 2 44 104857600 3 no current 4497190 26-9 month-12
You have selected 6 rows.
SQL> alter system switch logfile;
??????
SQL>/
GROUP # THREAD # SEQUENCE # bytes members arc status FIRST_CHANGE # FIRST_TIME
------------------------------------------------------------------------------------------------
1 1 87 52428800 1 No inactive 4427645 25-9 month-12
2 1 86 52428800 1 No inactive 435626825-9 month-12
3 2 43 52428800 1 no active 4402972 25-9 month-12
4 2 45 52428800 1 no current 4497215 26-9 month-12
5 1 88 104857600 2 no current 4495802 26-9 month-12
6 2 44 104857600 3 no active 4497190 26-9 month-12
You have selected 6 rows.
SQL> alter system switch logfile;
??????
SQL>/
GROUP # THREAD # SEQUENCE # bytes members arc status FIRST_CHANGE # FIRST_TIME
------------------------------------------------------------------------------------------------
1 1 87 52428800 1 no inactive 4427645 25-9 month-12
2 1 86 52428800 1 no inactive 4356268 25-9 month-12
3 2 46 52428800 1 no current 4497279 26-9 month-12
4 2 45 52428800 1 No inactive 449721526-9 month-12
5 1 88 104857600 2 no current 4495802 26-9 month-12
6 2 44 104857600 3 No inactive 4497190 26-9 month-12
You have selected 6 rows.
SQL> alter database droplogfile member '+ Data/myrac/onlinelog/myrackets redolog_group6_01 ';
The database has been changed.
SQL> select group #, member from V $ logfile where group # = 6;
Group # Member
------------------------------------------------------------------
6 + Data/myrac/onlinelog/myrac2_redolog_group6_02
6 + DATA/myrac/onlinelog/myrac2_redolog_group6_01
Deleted successfully
Next, go to ASMCMD to delete the physical file.
ASMCMD> ls
Group_1.257.772910379
Group_2.258.772910389
Group_3.265.772919275
Group_4.266.772919281
Group_5.268.795028735
Group_5.269.795029891
Group_6.270.795030293
Group_6.271.795030355
Group_6.272.795030429
Myrac1_redolog_group5_01
Myrac1_redolog_group5_02
Myrac1_redolog_group6_01
Myrac2_redolog_group6_01
Myrac2_redolog_group6_02
Ls-ls can see alias Association
ASMCMD> pp
Commands:
--------
Cd
Du
Find
Help
Ls
Lsct
Lsdg
Mkalias
Mkdir
Pwd
Rm
Rmalias
ASMCMD> rm myracw.redolog_group6_01
ASMCMD> ls
Group_1.257.772910379
Group_2.258.772910389
Group_3.265.772919275
Group_4.266.772919281
Group_5.268.795028735
Group_5.269.795029891
Group_6.271.795030355
Group_6.272.795030429
Myrac1_redolog_group5_01
Myrac1_redolog_group5_02
Myrac2_redolog_group6_01
Myrac2_redolog_group6_02
ASMCMD>
The following describes some log principles:
Principles: The following principles must be observed before deletion. Each instance must have at least two log groups. When a group is ACTIVE or CURRENT, it cannot be deleted; deleting a log GROUP only changes the database, and the operating system files have not been deleted. When the drop logfile group n statement is applied to the deletion, all members in group n will be deleted.
Alter database drop logfile group n;
Principles for deleting log members: When you delete the last member in the group, you cannot delete the Member. When the group's turntable is in the current status, you cannot delete the member; in archive mode, files must be archived before they can be deleted. to delete a member of a log group, only the database is changed, and files of the operating system are not deleted.
Alter database drop logfile member '/LOCATION_DUST/REDO0N_N.LOG ';