Reasons and methods for modifying redo log size in Oracle

Source: Internet
Author: User

Redo logs are generally set to convert logs to 10-20 minutes. Too frequent conversion may affect the performance. if the checkpoint incomplete in the AWR report is large, the switching between redo logs is too frequent. you can increase the redo log size to reduce the switching frequency. however, if the redo log size is too large, it may lead to the risk of data loss during database recovery. select redo log size in a compromise. The default value is 50 MB.

Modify the redo log size.
Assume that there are three log groups, each of which has one member. The size of each member is 1 MB. Now we want to change the size of all three log groups to 10 MB.

View the status of the Current Log File Group
Select group #, status from v $ log;

1. create two new log groups
Alter database add logfile group 4 ('d: \ Oracle \ ORADATA \ ORADB \ REDO04_1.LOG ') size 1024 k;
Alter database add logfile group 5 ('d: \ ORACLE \ ORADATA \ ORADB \ REDO05_1.LOG ') size 1024 k;

2. Switch the current log to a new log group.
Alter system switch logfile;
Alter system switch logfile;

3. Delete the old log Group
Alter database drop logfile group 1;
Alter database drop logfile group 2;
Alter database drop logfile group 3;

4. delete files in the original log group 1, 2, and 3 in the operating system

5. Rebuild log groups 1, 2, and 3
Alter database add logfile group 1 ('d: \ ORACLE \ ORADATA \ ORADB \ REDO01_1.LOG ') size 10 M;
Alter database add logfile group 2 ('d: \ ORACLE \ ORADATA \ ORADB \ REDO02_1.LOG ') size 10 M;
Alter database add logfile group 3 ('d: \ ORACLE \ ORADATA \ ORADB \ REDO03_1.LOG ') size 10 M;

6. Switch the log Group
Alter system switch logfile;
Alter system switch logfile;
Alter system switch logfile;

7. Delete the log groups for intermediate transition. 4 and 5
Alter database drop logfile group 4;
Alter database drop logfile group 5;

8. delete files in log group 4 and 5 under the Operating System

9. Back up the latest Control File
SQL> alter database backup controlfile to trace resetlogs

If
SQL> alter database mount;
ERROR at line 1:
ORA-01618: redo thread 3 is not enabled-cannot mount
This indicates that the redo log of thread 3 is not enabled and can be enabled in the following way:
Alter database enable thread 3;

Switch through alter system archive log current;

For more information about Oracle, see Oracle topics page http://www.bkjia.com/topicnews.aspx? Tid = 12

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.