概述
点击(此处)折叠或打开
- 备库在启动实时恢复后,进行测试,结果是仍然是redo apply
- --standby database
- alter database recover managed standby database using current logfile disconnect from session;
- SQL> select open_mode,database_role,db_unique_name from v$database;
- OPEN_MODE DATABASE_ROLE DB_UNIQUE_NAME
-------------------- ---------------- ------------------------------
READ ONLY WITH APPLY PHYSICAL STANDBY phydb - MRP0: Background Managed Standby Recovery process started (phydb)
Serial Media Recovery started
Managed Standby Recovery starting Real Time Apply
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Media Recovery Log +FLASHDG/phydb/archivelog/arch_925752176_1_150.arc
Media Recovery Log +FLASHDG/phydb/archivelog/arch_925752176_1_151.arc
Media Recovery Log +FLASHDG/phydb/archivelog/arch_925752176_1_152.arc
Media Recovery Waiting for thread 1 sequence 153 (in transit)
Completed: alter database recover managed standby database using current logfile disconnect from session - 备库正常开启日志实时恢复,接下来,主库删除部分数据 ,进行验证
点击(此处)折叠或打开
- --primary database 做删除数据的动作
- SQL> delete from xjmon.b where rownum <=1;
-
- 1 row deleted.
-
- SQL> commit;
-
- Commit complete.
-
- SQL> select count(*) from xjmon.b;
-
- COUNT(*)
- ----------
- 41
-
- SQL> archive log list;
- Database log mode Archive Mode
- Automatic archival Enabled
- Archive destination +FLASH/racdb/archivelog/
- Oldest online log sequence 157
- Next log sequence to archive 158
- Current log sequence 158
- SQL>
点击(此处)折叠或打开
- --standby database 检查,表数据未与主库保持一致
- SQL> archive log list;
- Database log mode Archive Mode
- Automatic archival Enabled
- Archive destination +FLASHDG/phydb/archivelog/
- Oldest online log sequence 157
- Next log sequence to archive 0
- Current log sequence 158
- SQL> select count(*) from xjmon.b;
-
- COUNT(*)
- ----------
- 42
- SQL> archive log list;
- Database log mode Archive Mode
- Automatic archival Enabled
- Archive destination +FLASHDG/phydb/archivelog/
- Oldest online log sequence 158
- Next log sequence to archive 0
- Current log sequence 159
-
- ---在primary database上进行切换日志文件操作后,standby database查询才进行了同步
- alter system switch lofile
-
- SQL> select count(*) from xjmon.b;
-
- COUNT(*)
- ----------
- 41
但同样的操作,在节点2上执行,实时恢复正常,备库上的数据随着主库节点2的commit后,保持与主库一致。
点击(此处)折叠或打开
- 节点1环境如下
- SQL> show parameter log_archive_dest
-
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- log_archive_dest string
- log_archive_dest_1 string LOCATION=+FLASH/RACDB/ARCHIVELOG/ valid_for=(all_logfiles,al
- l_roles) db_unique_name=racdb
-
- log_archive_dest_2 string SERVICE=phydb lgwr async valid_for=(online_logfiles,primary_
- role) db_unique_name=phydb
- log_archive_dest_20 string
点击(此处)折叠或打开
- --备库环境如下
- SQL> show parameter log_archive_dest_1
-
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- log_archive_dest_1 string LOCATION=+FLASHDG/phydb/ARCHIV
- ELOG/ valid_for=(all_logfiles,
- all_roles) db_unique_name=phyd
- b
- SQL> show parameter log_archive_dest_2
-
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- log_archive_dest_2 string SERVICE=racdb lgwr async valid
- _for=(online_logfiles,primary_
- role) db_unique_name=racdb
- ---备库是real-time apply
- SQL> select open_mode,database_role,db_unique_name from v$database;
OPEN_MODE DATABASE_ROLE DB_UNIQUE_NAME
-------------------- ---------------- ------------------------------
READ ONLY WITH APPLY PHYSICAL STANDBY phydb
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28551528/viewspace-2127056/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/28551528/viewspace-2127056/
最后
以上就是强健美女为你收集整理的Real-Time apply异常,求解的全部内容,希望文章能够帮你解决Real-Time apply异常,求解所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复