RFS[3]: No standby redo logfiles available for thread 1

问题描述:备库恢复DG之后,mrp进程一直是wait_for_log,主库创建数据没有正常同步,只有在切换归档的时候备库才能同步主库数据

 

查看主库日志,主库RFS进程提示没有可用的standby redo在线程1

主库输出日志:

RFS[3]: Assigned to RFS process 15362

RFS[3]: No standby redo logfiles available for thread 1

RFS[3]: Opened log for thread 1 sequence 712 dbid 1446616449 branch 1051207668

Sat Apr 24 10:19:52 2021

 

查询主备库standby_log大小

主库:

SQL> select group#,thread#,sequence#,bytes/1024/1024 from v$Log;

    GROUP#    THREAD#  SEQUENCE# BYTES/1024/1024
---------- ---------- ---------- ---------------
	 1	    1	     709	     512
	 2	    1	     710	     512
	 3	    1	     711	     512
	 4	    1	     712	     512
	 5	    1	     707	     512
	 6	    1	     708	     512

备库:

 

SQL> select group#,thread#,sequence#,bytes/1024/1024 from v$standby_log;

    GROUP#    THREAD#  SEQUENCE# BYTES/1024/1024
---------- ---------- ---------- ---------------
	30	    1	       0	     500
	31	    1	       0	     500
	32	    1	       0	     500
	33	    1	       0	     500
	34	    1	       0	     500
	38	    1	       0	     500
	39	    1	       0	     500

 

 

经比较主备库standby_log大小创建不一致,重建备库standby_log

 

alter database add standby logfile thread 1 group 48‘/data/orcl/std_redo48.log‘ size 512M;
alter database add standby logfile thread 1 group 49‘/data/orcl/std_redo49.log‘ size 512M;
alter database add standby logfile thread 1 group 40‘/data/orcl/std_redo40.log‘ size 512M;
alter database add standby logfile thread 1 group 41‘/data/orcl/std_redo41.log‘ size 512M;
alter database add standby logfile thread 1 group 42‘/data/orcl/std_redo42.log‘ size 512M;
alter database add standby logfile thread 1 group 43‘/data/orcl/std_redo43.log‘ size 512M;
alter database add standby logfile thread 1 group 44‘/data/orcl/std_redo44.log‘ size 512M;


alter database drop logfile group 38;
alter database drop logfile group 39;
alter database drop logfile group 30;
alter database drop logfile group 31;
alter database drop logfile group 32;
alter database drop logfile group 33;
alter database drop logfile group 34;

 

 

主库切换归档测试

alter system switch logfile;

 

备库:

SQL> select process, status, thread#,sequence#, block#, blocks from v$managed_standby;

PROCESS   STATUS	  THREAD#  SEQUENCE#	 BLOCK#     BLOCKS
--------- ------------ ---------- ---------- ---------- ----------
ARCH	  CONNECTED		0	   0	      0 	 0
ARCH	  CONNECTED		0	   0	      0 	 0
ARCH	  CONNECTED		0	   0	      0 	 0
ARCH	  CLOSING		1	 710	      1        416
RFS	  IDLE			0	   0	      0 	 0
MRP0	  APPLYING_LOG		1	 713	 255005    1048576
RFS	  IDLE			0	   0	      0 	 0
RFS	  IDLE			1	 713	 255005 	 1

8 rows selected.

 

状态正常,mrp进程已经变成applying_log

 

 

RFS[3]: No standby redo logfiles available for thread 1

上一篇:神奇的 SQL 之性能优化 → 让 SQL 飞起来


下一篇:mysql binlog 同步数据