oracle dg壞境主庫redolog修改大小,dgredolog

來源:互聯網
上載者:User

oracle dg壞境主庫redolog修改大小,dgredolog

--備庫standby
主庫四個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';


oracle下dg出現多個主庫怎解決

還不是很明白你的意思,能重新解釋一下嗎
 
oracle DG問題

standby database requires recovery,說明你的備庫和主庫沒有同步

需要足夠的日誌,recover一下,然後再open一下試試
 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.