【Vegas原创】在线修改redo.log文件的大小
1.查找日志文件的路径名和group#号
SQL> set linesize 50
SQL> select group#,member from v$logfile;
SQL> select group#,member from v$logfile;
GROUP#
----------
MEMBER
--------------------------------------------------
3
/u02/app/oracle2/oradata/dtlberp/redo03.log
2
/u02/app/oracle2/oradata/dtlberp/redo02.log
1
/u02/app/oracle2/oradata/dtlberp/redo01.log
2.添加新的日志文件组
alter database add logfile group 4 '/u02/app/oracle2/oradata/dtlberp/redo04.log' size 100m;
alter database add logfile group 5 '/u02/app/oracle2/oradata/dtlberp/redo05.log' size 100m;
alter database add logfile group 6 '/u02/app/oracle2/oradata/dtlberp/redo06.log' size 100m;
alter database add logfile group 5 '/u02/app/oracle2/oradata/dtlberp/redo05.log' size 100m;
alter database add logfile group 6 '/u02/app/oracle2/oradata/dtlberp/redo06.log' size 100m;
3. 适时切日志,在INACTIVE状态下,删除group1,2,3组
select * from v$log;
alter system switch logfile;
alter database drop logfile group 1;
alter database drop logfile group 2;
alter database drop logfile group 3;
alter system switch logfile;
alter database drop logfile group 1;
alter database drop logfile group 2;
alter database drop logfile group 3;
4,如果还想使用group1,2,3,则删除物理文件redo01.log,redo02.log和redo03.log,重复第2、3步骤即可。
alter database add logfile group 1 '/u02/app/oracle2/oradata/dtlberp/redo01.log' size 100m;
alter database add logfile group 2 '/u02/app/oracle2/oradata/dtlberp/redo02.log' size 100m;
alter database add logfile group 3 '/u02/app/oracle2/oradata/dtlberp/redo03.log' size 100m;
select * from v$log;
alter system switch logfile;
alter database drop logfile group 4;
alter database drop logfile group 5;
alter database drop logfile group 6;
alter database add logfile group 2 '/u02/app/oracle2/oradata/dtlberp/redo02.log' size 100m;
alter database add logfile group 3 '/u02/app/oracle2/oradata/dtlberp/redo03.log' size 100m;
select * from v$log;
alter system switch logfile;
alter database drop logfile group 4;
alter database drop logfile group 5;
alter database drop logfile group 6;
喜欢请赞赏一下啦^_^