Sometimes, as the business grows, you need to re-plan the redo log. For example, if there are three groups of existing logs, one member in each group, and each member is 50 MB in size, it is obviously unreasonable for the production database. We need to make adjustments based on the business data. Generally, we recommend that you have two members in each group. The size of a file cannot exceed 2 GB. The procedure is as follows:
1. Create a log group:
Alter database add logfile group 1
('/Opt/Oracle/redo01a. log ',
'/Opt/oracle/redo01b. log ')
Size 2G;
2. After creating several groups of log groups, we need to switch the unused log groups to the INACTIVE status. Syntax:
Alter system switch logfile;
If the status of the log group to be deleted is always active, you can use
Alter system checkpoint;
In this way, active will become inactive.
3. delete a log Group
Alter database drop logfile group n;
4. This is just a logical deletion. You also need to delete useless physical files from the disk.