问题描述:安装EM13C时告警redo log file size should be 300,000,000bytes.

调整redo log file大小—单实例 每组1个成员_sql

解决方案:调整redo log file大小.

SQL> r
1* select b.thread#,a.group#,a.member,bytes/1024/1024,b.members from v$logfile a,v$log b where a.group#=b.group#

THREAD# GROUP# MEMBER BYTES/1024/1024 MEMBERS
---------- ---------- ---------------------------------------- --------------- ----------
1 3 /u01/app/oracle/oradata/EMREP/redo03.log 200 1
1 2 /u01/app/oracle/oradata/EMREP/redo02.log 200 1
1 1 /u01/app/oracle/oradata/EMREP/redo01.log 200 1
将redo大小调整到500m.

SQL> alter database add logfile group 4 ('/u01/app/oracle/oradata/EMREP/redo04.log') size 500m;

Database altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system checkpoint;

System altered.

SQL> select group#,thread#,sequence#,members,status,archived from v$log;

GROUP# THREAD# SEQUENCE# MEMBERS STATUS ARC
---------- ---------- ---------- ---------- ---------------- ---
1 1 13 1 INACTIVE NO
2 1 14 1 INACTIVE NO
3 1 12 1 INACTIVE NO
4 1 15 1 CURRENT NO

SQL> alter database drop logfile group 1; (说明:drop前需确认状态为INACTIVE)

Database altered.

SQL> select group#,thread#,sequence#,members,status,archived from v$log;

GROUP# THREAD# SEQUENCE# MEMBERS STATUS ARC
---------- ---------- ---------- ---------- ---------------- ---
2 1 14 1 INACTIVE NO
3 1 12 1 INACTIVE NO
4 1 15 1 CURRENT NO

[oracle@leo EMREP]$ rm -rf redo01.log

SQL> alter database add logfile group 1 ('/u01/app/oracle/oradata/EMREP/redo01.log') size 500m;

Database altered.

SQL> select group#,thread#,sequence#,members,status,archived from v$log;

GROUP# THREAD# SEQUENCE# MEMBERS STATUS ARC
---------- ---------- ---------- ---------- ---------------- ---
1 1 0 1 UNUSED YES
2 1 14 1 INACTIVE NO
3 1 12 1 INACTIVE NO
4 1 15 1 CURRENT NO

SQL> alter database drop logfile group 2;

Database altered.

SQL> alter database drop logfile group 3;

Database altered.

[oracle@leo EMREP]$ rm -rf redo02.log
[oracle@leo EMREP]$ rm -rf redo03.log

SQL> alter database add logfile group 2 ('/u01/app/oracle/oradata/EMREP/redo02.log') size 500m;

Database altered.

SQL> alter database add logfile group 3 ('/u01/app/oracle/oradata/EMREP/redo03.log') size 500m;

Database altered.

SQL> select group#,thread#,sequence#,members,status,archived from v$log;

GROUP# THREAD# SEQUENCE# MEMBERS STATUS ARC
---------- ---------- ---------- ---------- ---------------- ---
1 1 0 1 UNUSED YES
2 1 0 1 UNUSED YES
3 1 0 1 UNUSED YES
4 1 15 1 CURRENT NO

SQL> alter system switch logfile;

System altered.

SQL> alter system checkpoint;

System altered.

SQL> select group#,thread#,sequence#,members,status,archived from v$log;

GROUP# THREAD# SEQUENCE# MEMBERS STATUS ARC
---------- ---------- ---------- ---------- ---------------- ---
1 1 16 1 CURRENT NO
2 1 0 1 UNUSED YES
3 1 0 1 UNUSED YES
4 1 15 1 INACTIVE NO

SQL> alter database drop logfile group 4;

Database altered.

[oracle@leo EMREP]$ rm -rf redo04.log

SQL> select group#,thread#,sequence#,members,status,archived from v$log;

GROUP# THREAD# SEQUENCE# MEMBERS STATUS ARC
---------- ---------- ---------- ---------- ---------------- ---
1 1 16 1 INACTIVE NO
2 1 17 1 CURRENT NO
3 1 0 1 UNUSED YES

SQL> select b.thread#,a.group#,a.member,bytes/1024/1024,b.members from v$logfile a,v$log b where a.group#=b.group#;

THREAD# GROUP# MEMBER BYTES/1024/1024 MEMBERS
---------- ---------- ---------------------------------------- --------------- ----------
1 2 /u01/app/oracle/oradata/EMREP/redo02.log 500 1
1 3 /u01/app/oracle/oradata/EMREP/redo03.log 500 1
1 1 /u01/app/oracle/oradata/EMREP/redo01.log 500 1