目的:修改当前在线日志从默认50M增加至512M。
1.查看当前日志组的状态
SQL> select group#,members,bytes/1024/1024,status from v$log;
GROUP# MEMBERS BYTES/1024/1024 STATUS
---------- ---------- --------------- ----------------
1 1 50 INACTIVE
2 1 50 CURRENT
3 1 50 INACTIVE
2.查看在线日志组的位置
SQL> select MEMBER from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/u01/app/oradata/ARPDB/redo01.log
/u01/app/oradata/ARPDB/redo02.log
/u01/app/oradata/ARPDB/redo03.log
3.新增group 4-6日志组,大小为512M
alter database add logfile group 4 ('/u01/app/oradata/ARPDB/redo04.log') size 512M;
alter database add logfile group 5 ('/u01/app/oradata/ARPDB/redo05.log') size 512M;
alter database add logfile group 6 ('/u01/app/oradata/ARPDB/redo06.log') size 512M;
4.切换当前日志到新的日志组
alter system switch logfile;
alter system switch logfile;
---让在线日志组,变成inactive的方式,执行如下命令:
alter system checkpoint;
5.删除旧的日志组
alter database drop logfile group 1;
alter database drop logfile group 2;
alter database drop logfile group 3;
6.查看修改后的日志组的状态信息:
SQL> select group#,members,bytes/1024/1024,status from v$log;
GROUP# MEMBERS BYTES/1024/1024 STATUS
---------- ---------- --------------- ----------------
4 1 512 INACTIVE
5 1 512 CURRENT
6 1 512 UNUSED
阅读(2095) | 评论(0) | 转发(0) |