1 事先配置好反向复制链路;

2 停止源端的应用程序;

3 确认源端Capture已捕获所有的Redo信息;

GGSCI>info all

GGSCI>info ext_app

4 确认源端所有queue中无积压数据

GGSCI>info all

GGSCI>info ext_app

GGSCI>info pmp_app

5 把源端的压缩表和要复制的接口表等复制到目标端;

6 确认目标端的sequence的next_value大于等于源端的值,如不满足要求需要对目标端的

sequence进行调整;

7 比对源端和目标端表的数据是否一致;[minus或者count(*)或者hash value对比];或用

vardata工具抽样进行全表对比;

8 启用目标端的约束和外键以及job;

select 'alter table '||owner||'.'||table_name||' enable constraint '||constraint_name||';'

from dba_constraints

where constraint_type in ('R') and

owner in('APPUSR')

order by status,owner;

select 'alter trigger '||owner||'.'||trigger_name||' enable;'

from dba_triggers

where owner in('APPUSR')

order by status,owner;

SQL>alter system set job_processes=10 scope=both sid=’*’;

9 停止源端的约束和外键以及job;

select 'alter table '||owner||'.'||table_name||' disable constraint '||constraint_name||';'

from dba_constraints

where constraint_type in ('R') and

owner in('APPUSR')

order by status,owner;

select 'alter trigger '||owner||'.'||trigger_name||' disable;'

from dba_triggers

where owner in('APPUSR')

order by status,owner;

SQL>alter system set job_processes=0 scope=both sid=’*’;

10 启动反向复制的Capture进程,如有可能启动DataPump进程;

11 把应用程序切换到目标端;

12 确认目标端Capture进程状态正常;

13 源端数据库修复后,需要进行反向回切,在此过程中可能需要将数据库从目标端初始化到源端,视具体情况而定;

14 启动反向复制DataPump进程和Replicat进程,将数据从目标端Apply到源端;

15 停止目标端的应用

16 确认源端的Replicat队列没有数据了;

17 把目标端的压缩表和要复制的接口表等复制到源端

18 比对源端和目标端表的数据是否一致;[minus或者count(*)或者hash value对比]

Internal Partner Win Story

19 确认源端的sequence的next_value大于等于目标端的值,如果不是,则需要调整源端的Sequence;

20 启用源端的trigger和约束,以及job

select 'alter table '||owner||'.'||table_name||' enable constraint '||constraint_name||';'

from dba_constraints

where constraint_type in ('R') and

owner in('APPUSR')

order by status,owner;

select 'alter trigger '||owner||'.'||trigger_name||' enable;'

from dba_triggers

where owner in('APPUSR')

order by status,owner;

SQL>alter system set job_processes=10 scope=both sid=’*’;

21 停止目标端的约束和外键以及job

select 'alter table '||owner||'.'||table_name||' disable constraint '||constraint_name||';'

from dba_constraints

where constraint_type in ('R') and

owner in('APPUSR')

order by status,owner;

select 'alter trigger '||owner||'.'||trigger_name||' disable;'

from dba_triggers

where owner in('APPUSR')

order by status,owner;

SQL>alter system set job_processes=0 scope=both sid=’*’;

22 启动目标端的Replicat

23 源端启用应用,回切完成

GoldenGate 反向切换步骤的更多相关文章

  1. mybatis 反向生成步骤

    Mybatis 反向生成. 反向生成的步骤: 反向生成的文件 打开文件夹显示 3.打开generator.xml文件 更改配置信息  路径一般情况下用英文  中文的路径有些会识别不了  或产生乱码 4 ...

  2. 关于Cocos2d-x项目运行的过程和场景切换步骤

    1.AppDelegate.cpp文件里面的applicationDidFinishLaunching函数其实可以看做C语言里面的main函数,是整个游戏运行的入口 这个函数里面的语句 auto sc ...

  3. (转)mysql主从切换步骤

    原文:http://6226001001.blog.51cto.com/9243584/1723273 1> 正常切换 1)从服务器检查SHOW PROCESSLIST语句的输出,直到你看到Ha ...

  4. OGG切换步骤

    步骤描述 提前准备好切换方案:以及其他相关人员的配合 切换至容灾数据库: (1)停止前端业务,确认目标端数据已经追平 (2)数据校验,确认数据一致 (3)停止生产库OGG进程(停止后可以直接删除) ( ...

  5. 使用 Postman 的 Environments 和 Tests 简化在不同环境中的切换步骤

    调试 API 的时候,我们需要经常需要在本地.开发.生产来回切换,还需要面临 Token 失效等的问题,让人头大,看到一些教程有介绍用 Postman 来简化流程,但是实践起来还是遇到一些问题,所以就 ...

  6. mysql主从切换步骤

    1>   正常切换 1)从server检查SHOW PROCESSLIST语句的输出,直到你看到Has read all relaylogwaiting for the slave I/O th ...

  7. 物理Data Guard主备切换步骤

    物理Data Guard角色转换步骤   Step  1   验证主库是否能执行角色转换到备库(原主库执行) SQL> SELECT SWITCHOVER_STATUS FROM V$DATAB ...

  8. UNDO表空间切换步骤

    1.新建UNDO表空间 create undo tablespace UNDOTBS2 datafile '/data01/testdb/undotbs01.dbf' size 1G; alter d ...

  9. Android注解使用之注解编译android-apt如何切换到annotationProcessor

    前言: 自从EventBus 3.x发布之后其通过注解预编译的方式解决了之前通过反射机制所引起的性能效率问题,其中注解预编译所采用的的就是android-apt的方式,不过最近Apt工具的作者宣布了不 ...

随机推荐

  1. nyoj--747--蚂蚁的难题(三)(dp背包)

    蚂蚁的难题(三) 时间限制:2000 ms  |  内存限制:65535 KB 难度:4 描述 蚂蚁终于把尽可能多的食材都搬回家了,现在开始了大厨计划. 已知一共有 n 件食材,每件食材有一个美味度  ...

  2. 用exp命令按用户导出的DMP文件缺少表,某些表是空表

    1.用以下这句查找空表并生成执行命令 select 'alter table '||table_name||' allocate extent;' from user_tables where num ...

  3. C# 导出excel的压缩包到浏览器页面

    需求背景:TCX_1710项目产品质量导出功能,客户希望每个总成导出到一个Excel表中 实现分析:客户选择时间段,点击导出按钮,默认导出开始时间当天的数据,每个总成一个Excel,将各个Excel打 ...

  4. (转载)ExpandableListView 安卓二级菜单

    ExpandableListView 安卓二级菜单   ExpandableListView可以显示一个视图垂直滚动显示两级列表中的条目,这不同于列表视图(ListView).ExpandableLi ...

  5. Thread-local storage

    Thread-local storage (TLS) is a computer programming method that uses static or global memory local ...

  6. SpringCloud学习笔记(6)----Spring Cloud Netflix之负载均衡-Ribbon的使用

    1. 什么是负责均衡? 负载均衡,就是分发请求流量到不同的服务器. 负载均衡一般分为两种 1. 服务器端负载均衡(nginx) 2. 客户端负载均衡(Ribbon) 2. 服务提供者(spring-c ...

  7. 启动tomcat运行maven工程报错:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:

    控制台报错信息:

  8. [洛谷P1750]KC喝咖啡

    题目大意:给你n个物品,每个物品有一个价值$v_i$和一个时间$t_i$,要你取m个物品,使得他们的美味度($\frac{\sum v_i}{\sum t_i}$)最大,求这个美味度. 解题思路:由于 ...

  9. root of factory hierarchy

    项目编译错误! project---->clean

  10. webpack2.X、Vue学习以及将两者相结合

    在家的闲暇时间来完善自己的前端知识. 经过两三天的学习,按照webpack文档学习,vue文档学习,最后实现了两者结合的目标. webpack 按照网站上guide的流程依次学习 1.使用npm安装w ...