Redo log modification and Reconstruction

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.