设为首页 加入收藏

TOP

Oracle Standby Redo Log实验两则(五)
2015-11-12 21:29:26 来源: 作者: 【 】 浏览:25
Tags:Oracle Standby Redo Log 实验
ndby端arch进程来不及将日志写入归档,应该也会写入到另一组的standby redo log中。


下面如果启动程序,进行更新。


SQL> alter database recover managed standby database using current logfile disconnect from session;


Database altered


在日志中看到应用日志过程:


Mon Oct 19 11:23:53 2015


alter database recover managed standby database using current logfile disconnect from session


Attempt to start background Managed Standby Recovery process (vlifesb)


Mon Oct 19 11:23:53 2015


MRP0 started with pid=28, OS id=15602?


MRP0: Background Managed Standby Recovery process started (vlifesb)


?started logmerger process


Mon Oct 19 11:23:58 2015


Managed Standby Recovery starting Real Time Apply


Parallel Media Recovery started with 4 slaves


Waiting for all non-current ORLs to be archived...


All non-current ORLs have been archived.


Media Recovery Log /u01/app/oracle/fast_recovery_area/VLIFESB/archivelog/2015_10_19/o1_mf_1_39_c28rgoqb_.arc


Media Recovery Log /u01/app/oracle/fast_recovery_area/VLIFESB/archivelog/2015_10_19/o1_mf_1_40_c28rgpq1_.arc


Media Recovery Log /u01/app/oracle/fast_recovery_area/VLIFESB/archivelog/2015_10_19/o1_mf_1_41_c28rgtl2_.arc


Media Recovery Waiting for thread 1 sequence 42 (in transit)


Recovery of Online Redo Log: Thread 1 Group 4 Seq 42 Reading mem 0


? Mem# 0: /u01/app/oracle/oradata/VLIFESB/onlinelog/o1_mf_4_c265gc9q_.log


? Mem# 1: /u01/app/oracle/fast_recovery_area/VLIFESB/onlinelog/o1_mf_4_c265gcfk_.log


Completed: alter database recover managed standby database using current logfile disconnect from session


这个过程中,进行standby recovery操作,先从归档日志中找到没有apply的进行应用。之后应用standby redo log。


此时,apply成功,能够追上Primary。


SQL> select group#, dbid, sequence#, used, archived, status from v$standby_log;


? ? GROUP# DBID? ? ? ? ? ? ? ? ? SEQUENCE#? ? ? USED ARCHIVED STATUS


---------- -------------------- ---------- ---------- -------- ----------


? ? ? ? 4 4207470439? ? ? ? ? ? ? ? ? 42? ? 107520 YES? ? ? ACTIVE


? ? ? ? 5 UNASSIGNED? ? ? ? ? ? ? ? ? ? 0? ? ? ? ? 0 NO? ? ? UNASSIGNED


? ? ? ? 6 UNASSIGNED? ? ? ? ? ? ? ? ? ? 0? ? ? ? ? 0 YES? ? ? UNASSIGNED


SQL> select recid, sequence#, ARCHIVED, APPLIED, DELETED from v$archived_log;


? ? RECID? SEQUENCE# ARCHIVED APPLIED? DELETED


---------- ---------- -------- --------- -------


(篇幅原因,有省略……)


? ? ? ? 15? ? ? ? 36 YES? ? ? YES? ? ? NO


? ? ? ? 16? ? ? ? 37 YES? ? ? YES? ? ? NO


? ? ? ? 17? ? ? ? 38 YES? ? ? YES? ? ? NO


? ? ? ? 18? ? ? ? 39 YES? ? ? YES? ? ? NO


? ? ? ? 19? ? ? ? 40 YES? ? ? YES? ? ? NO


? ? ? ? 20? ? ? ? 41 YES? ? ? IN-MEMORY NO


20 rows selected


4、结论


Standby Redo Log是Standby数据库的online redo log。对于Oracle而言,online redo log和standby redo log都反映了当前最近的一个日志对象。针对数据库角色的不同,应用的操作各走两支。


首页 上一页 2 3 4 5 下一页 尾页 5/5/5
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇MySQL 多主多活 Galera 集群部署.. 下一篇CentOS下Redis高可用安装过程

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: