Oracle 重做日志调整 SQL语句

Oracle 数据库安装之后,重做日志默认为 3组,如果需要新增删除,可以通过以下方式!

查询:

set line222
col member for a60
select a.group#,b.member member,a.bytes/1024/1024 "size(M)" from v$log a,v$logfile b where a.group#=b.group#;

新增:

单机数据库:

alter database add logfile group 4 '/oradata/orcl/redo04.log' size 50M;
alter database add logfile group 5 '/oradata/orcl/redo05.log' size 50M;
alter database add logfile group 16 '/oradata/orcl/redo16.log' size 1024M;
alter database add logfile group 17 '/oradata/orcl/redo17.log' size 1024M;
alter database add logfile group 18 '/oradata/orcl/redo18.log' size 1024M;

RAC集群数据库:

alter database add logfile thread 1 
group 4 '/oradata/orcl/redo04.log' size 50M,
group 5 '/oradata/orcl/redo05.log' size 50M,
group 6 '/oradata/orcl/redo06.log' size 50M;

alter database add logfile thread 2
group 7 '/oradata/orcl/redo07.log' size 50M,
group 8 '/oradata/orcl/redo08.log' size 50M,
group 9 '/oradata/orcl/redo09.log' size 50M;

删除:

alter database drop logfile group 16; 
alter database drop logfile group 17; 
alter database drop logfile group 18; 

上一篇:ORACLE 切换个实例,启动多个实例


下一篇:通用_11gr2 STREAMS部署(单向)