简要介绍
在生产环境中为一个Oracle数据库增加DG节点,以只读的方式打开,采用实时同步的方式同步数据。数据的迁移没有采用在线复制,
主要的原因是数据量比较大,而是采用的RMAN恢复,一切进行的很顺利,standby节点与主库也可以进行数据同步,
但是在日志中发现这样的信息——RFS[6]: No standby redo logfiles created for thread 1 ,所以我判断在同步的过程并没有使用 standby redo logfile ,
经查询在恢复数据之前创建的4个 standby redo logifle都是 unassigned 状态,正常的应该是有一个是 active状态,经过查找资料需要重新创建 standby redo logfile,
重新创建后数据同步使用了 standby redo logfile文件,下面是我的操作过程。
【其主要的缺点是不能经常的保证完全的与主库实时,可以查v$dataguard_stats来确定。】
primary database is in MAXIMUM PERFORMANCE mode
RFS[18075]: Assigned to RFS process 27210
RFS[18075]: No standby redo logfiles available for thread 1
RFS[18075]: Opened log for thread 1 sequence 68369 dbid 809919918 branch 812303150
Thu Dec 12 09:32:32 2013
Archived Log entry 19674 added for thread 2 sequence 51723 rlc 812303150 ID 0x3045bbae dest 2:
Thu Dec 12 09:32:33 2013
Media Recovery Log +RECOVERY/stbdb/archivelog/2013_12_12/thread_2_seq_51723.11845.833962885
Thu Dec 12 09:32:34 2013
Primary database is in MAXIMUM PERFORMANCE mode
Thu Dec 12 09:32:47 2013
RFS[18076]: Assigned to RFS process 27212
RFS[18076]: No standby redo logfiles available for thread 2
Thu Dec 12 09:32:47 2013
Media Recovery Log +RECOVERY/stbdb/archivelog/2013_12_12/thread_1_seq_68367.11846.833964907
RFS[18076]: Opened log for thread 2 sequence 51724 dbid 809919918 branch 812303150
Thu Dec 12 09:33:30 2013
Media Recovery Log +RECOVERY/stbdb/archivelog/2013_12_12/thread_1_seq_68368.11847.833966061
Thu Dec 12 09:33:58 2013
Media Recovery Waiting for thread 1 sequence 68369 (in transit)
Thu Dec 12 09:48:45 2013
1、FRIMARY SERVER:
在RAC PRIMARY 端,先关闭日志同步。
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=defer;
System altered.
2.暂停STANDBY
SQL> alter database recover managed standby database cancel;
3.修改模式:
SQL> alter system set standby_file_management=manual;
System altered.
删除归档,将所有的standby log组删除,然后再重建
SQL> alter database clear logfile group 5;
Database altered.
SQL> alter database drop logfile group 5;
Database altered.
。。。。。
增加standby 日志
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 SIZE 50M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 SIZE 50M;
。。。。。。
恢复到正常模式。
SQL> alter system set standby_file_management=auto;
System altered.
启动REDO实时应用日志(备库)
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT from session;
Database altered.
重启日志同步
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=enable;
System altered.
————————————————
版权声明:本文为CSDN博主「不再疯要傻」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/bzfys/article/details/49303417
来源:https://www.cnblogs.com/chendian0/p/12456873.html