[email protected]>select group#, bytes/1024/1024 size_m,status,archived from V$log;
group# size_m STATUS ARC
---------- ---------- ---------------- ---
1 INACTIVE YES
2 INACTIVE YES
3 Current NO
2. Delete the original log group; (only log groups with inactive status)
To operate the log group as current, log switchover is required first: alter system switch logfile;
If active, the checkpoint can be enforced: alter system checkpoint;
[email protected]>alter system switch logfile;
System altered.
[email protected]>alter system checkpoint; --enforcement of checkpoints
[email protected]>select group#, bytes/1024/1024 size_m,status,archived from V$log;
group# size_m STATUS ARC
---------- ---------- ---------------- ---
1 INACTIVE YES
2 INACTIVE YES
3 ACTIVE YES
[email protected]>alter database drop logfile Group 1;
Database altered.
[email protected]>alter database drop logfile Group 2;
Database altered.
---------------------------
After deletion, you also need to go to the specified directory to delete the log files before the file can be established, such as the establishment of other names of the log group, there should be no such limit.
---------------------------
3. Add 3 sets of log groups of size 200M;
[email protected]>alter Database Add logfile Group 1 '/u01/app/oracle/oradata/orcl11g/redo01.log ' size 200m ;
Database altered.
[email protected]>alter database add logfile Group 2 '/u01/app/oracle/oradata/orcl11g/redo02.log ' size 200m ;
Database altered.
[email protected]>alter database Add logfile Group 3 '/u01/app/oracle/oradata/orcl11g/redo03.log ' size 200m ;
4. Add members to a log group
cd/u01/app/oracle/oradata/orcl11g/
mkdir Redo_bak
[email protected]>alter database Add logfile member '/u01/app/oracle/oradata/orcl11g/redo_bak/redo01_ B.log ' to group 1;
Database altered.
[email protected]>alter database Add logfile member '/u01/app/oracle/oradata/orcl11g/redo_bak/redo02_ B.log ' to group 2;
Database altered.
[email protected]>alter database Add logfile member '/u01/app/oracle/oradata/orcl11g/redo_bak/redo03_ B.log ' to group 3;
Database altered.
5. Delete Log Group members
ALTER DATABASE drop logfile member '/u01/app/oracle/oradata/orcl11g/redo_bak/redo02_b.log ';
Modify Redo_logfile group members and size