概述
要将日志文件组1,2,3从100M修改到200M方法如下
$ ls
control01.ctl drsys01.dbf redo01.log temp01.dbf xdb01.dbf
control02.ctl example01.dbf redo02.log tools01.dbf
control03.ctl indx01.dbf redo03.log undotbs01.dbf
cwmlite01.dbf odm01.dbf system01.dbf users01.dbf
$ ls -l redo01.log
-rw-r----- 1 oracle dba 104858112 Jan 04 16:34 redo01.log
$ du -m redo01.log
100.00 redo01.log
登陆SQLPLUS
--------------------
$ sqlplus /nolog
SQL*Plus: Release 9.2.0.7.0 - Production on Fri Jan 4 16:48:40 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> conn / as sysdba;
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1377274120 bytes
Fixed Size 743688 bytes
Variable Size 738197504 bytes
Database Buffers 637534208 bytes
Redo Buffers 798720 bytes
Database mounted.
Database opened.
SQL> select group# from v$log;
GROUP#
----------
1
2
3
创建日志文件组4,5
---------------------------
SQL> alter database add logfile group 4 '/opt/oracle/product/9i/oradata/oracle9i/redo04.log' size 200M;
Database altered.
SQL> alter database add logfile group 5 '/opt/oracle/product/9i/oradata/oracle9i/redo05.log' size 200M;
Database altered.
将日志文件组切换到新建立的4,5日志文件组上
--------------------------------------------------------------
SQL> alter system switch logfile;
System altered.
SQL> alter system switch logfile;
System altered.
SQL> select group#,status from v$log;
GROUP# STATUS
---------- ----------------
1 INACTIVE
2 INACTIVE
3 INACTIVE
4 INACTIVE
5 CURRENT
删除已有的1,2,3日志文件组
---------------------------------------
SQL> alter database drop logfile group 1;
Database altered.
SQL> alter database drop logfile group 2;
Database altered.
SQL> alter database drop logfile group 3;
Database altered.
增加新的日志文件1,2,3,并设定容量为200M
------------------------------------------------------------
SQL> alter database add logfile group 1 '/opt/oracle/product/9i/oradata/oracle9i/redo01.log' size 200M;
Database altered.
SQL> alter database add logfile group 2 '/opt/oracle/product/9i/oradata/oracle9i/redo02.log' size 200M;
Database altered.
SQL> alter database add logfile group 3 '/opt/oracle/product/9i/oradata/oracle9i/redo03.log' size 200M;
Database altered.
SQL> alter system switch logfile;
System altered.
SQL> alter system switch logfile;
System altered.
SQL> select group#,status from v$log;
GROUP# STATUS
---------- ----------------
1 INACTIVE
2 CURRENT
3 UNUSED
4 INACTIVE
5 INACTIVE
删除刚刚增加的日志文件组4,5
-----------------------------------------
SQL> alter database drop logfile group 4;
Database altered.
SQL> alter database drop logfile group 5;
Database altered.
注意:每一步删除drop操作,都需要手工删除os中的实体文件。
另外注意备份控制文件。
SOURCE:http://space.itpub.net/?uid-12361284-action-viewspace-itemid-101100
最后
以上就是悦耳跳跳糖为你收集整理的oracle dg 更改redo日志大小,修改online redo日志文件大小的全部内容,希望文章能够帮你解决oracle dg 更改redo日志大小,修改online redo日志文件大小所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复