国内最全IT社区平台 联系我们 | 收藏本站
华晨云阿里云优惠2
您当前位置:首页 > 互联网 > oracle dg坏境主库redolog修改大小

oracle dg坏境主库redolog修改大小

来源:程序员人生   发布时间:2014-11-18 08:14:37 阅读次数:2948次

--备库standby
主库4个redolog 之前都是50M大小

SQL>

alter database recover managed standby database cancel;
 
Database altered.
 
SQL> alter database add standby logfile group 11 ('+DATA/orcldg/onlinelog/standby_group_11.log') size 60M;
alter database add standby logfile group 12 ('+DATA/orcldg/onlinelog/standby_group_12.log') size 60M;
alter database add standby logfile group 13 ('+DATA/orcldg/onlinelog/standby_group_13.log') size 60M;
alter database add standby logfile group 14 ('+DATA/orcldg/onlinelog/standby_group_14.log') size 60M;
alter database add standby logfile group 15 ('+DATA/orcldg/onlinelog/standby_group_15.log') size 60M;
alter database add standby logfile group 16 ('+DATA/orcldg/onlinelog/standby_group_16.log') size 60M;


备库standby删除
alter database drop logfile group 5;
alter database drop logfile group 6;
alter database drop logfile group 7;
alter database drop logfile group 8;
alter database drop logfile group 9;
alter database drop logfile group 10;



主库redo添加


alter database add logfile thread 1  group 11 ('+DATA/orcl/onlinelog/group_11.log') size 60m;
alter database add logfile thread 1  group 12 ('+DATA/orcl/onlinelog/group_12.log') size 60m;
alter database add logfile thread 2  group 13 ('+DATA/orcl/onlinelog/group_13.log') size 60m;
alter database add logfile thread 2  group 14 ('+DATA/orcl/onlinelog/group_14.log') size 60m;


主库redo 删除
alter database drop logfile group 1;
alter database drop logfile group 2;
alter database drop logfile group 3;
alter database drop logfile group 4;



备库redo添加

刚开始删除的时候可能报错,履行以下命令:

alter system set standby_file_management='manual';

然后删除

alter database add logfile group 5 ('+DATA/orcldg/onlinelog/group_05.log') size 60m;
alter database add logfile group 6 ('+DATA/orcldg/onlinelog/group_06.log') size 60m;
alter database add logfile thread 2 group 7 ('+DATA/orcldg/onlinelog/group_07.log') size 60m;
alter database add logfile thread 2 group 8 ('+DATA/orcldg/onlinelog/group_08.log') size 60m;

alter database clear logfile '+DATA/orcldg/onlinelog/group_2.272.862167353'


备库redo删除
alter database drop logfile group 1;
alter database drop logfile group 2;
alter database drop logfile group 3;
alter database drop logfile group 4;
 
--这类也是可以的
alter database add logfile member  ('+DATA/orcldg/onlinelog/group_2.273.862167353') size 60M reuse;

create spfile from pfile='$ORACLE_HOME/dbs/pfile_for_standby.txt'

如果遇到毛病可以查看   log_file_name_convert 与 db_file_name_convert  是不是有问题  
alter system set log_file_name_convert='+DATA/orcl/onlinelog, +DATA/orcldg/onlinelog' scope=spfile;
alter system set db_file_name_convert='+DATA/orcl/datafile, +DATA/orcldg/datafile' scope=spfile;



--主库standby 删除
alter database drop logfile group 5;

alter database drop logfile group 6;

alter database drop logfile group 7;
alter database drop logfile group 8;
alter database drop logfile group 9;
alter database drop logfile group 10;
主库standby 添加

alter database add standby logfile group 5 ('+DATA/orcl/onlinelog/standby_group_05.log') size 60M reuse;  
alter database add standby logfile group 6 ('+DATA/orcl/onlinelog/standby_group_06.log') size 60M reuse;

alter database add standby logfile group 7 ('+DATA/orcl/onlinelog/standby_group_07.log') size 60M reuse;
alter database add standby logfile group 8 ('+DATA/orcl/onlinelog/standby_group_08.log') size 60M reuse;

alter database add standby logfile group 9 ('+DATA/orcl/onlinelog/standby_group_9.log') size 60M reuse;
alter database add standby logfile group 10 ('+DATA/orcl/onlinelog/standby_group_10.log') size 60M reuse;


然后在备库履行
alter database recover managed standby database using current logfile disconnect;
alter system set standby_file_management='auto';

生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠
程序员人生
------分隔线----------------------------
分享到:
------分隔线----------------------------
关闭
程序员人生