C/C++教程

Oracle 重做日志调整 SQL语句

本文主要是介绍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 重做日志调整 SQL语句的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!