Modify Redo_logfile group members and size

Source: Internet
Author: User


[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

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.