环境:
OS:Red Hat Linux As 5
DB:11.2.0.1(ASM)
1.查看当前日志大小
SQL> Select Group#,bytes/1024/1024 "Size(M)" From v$log;
GROUP# Size
---------- ----------
1 50
2 50
3 50
2.添加redo日志组
alter database add logfile group 4 ('+DATA', '+RECDATA') size 128m;
alter database add logfile group 5 ('+DATA', '+RECDATA') size 128m;
alter database add logfile group 6 ('+DATA', '+RECDATA') size 128m;
3.查看当前的日志组状态
SQL> select group#,status from v$log;
GROUP# STATUS
---------- ----------------
1 CURRENT
2 INACTIVE
3 INACTIVE
4 UNUSED
5 UNUSED
6 UNUSED
6 rows selected.
切换日志,使日志状态转换为INACTIVE
alter system switch logfile;
删除状态为INACTIVE的日志组
alter database drop logfile group 1;
alter database drop logfile group 2;
alter database drop logfile group 3;
4.重新创建日志组(1 2 3),重新定义大小
alter database add logfile group 1 ('+DATA', '+RECDATA') size 128m;
alter database add logfile group 2 ('+DATA', '+RECDATA') size 128m;
alter database add logfile group 3 ('+DATA', '+RECDATA') size 128m;
5.查看日志组
SQL> Select Group#,bytes/1024/1024 "Size" From v$log;
GROUP# Size
---------- ----------
1 128
2 128
3 128
4 128
5 128
6 128
6 rows selected.
这样每个日志组的大小由之前的50M修改为128M.
-- The End --
阅读(4748) | 评论(0) | 转发(1) |