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. hpc-ai比赛相关资料

    http://follitude.com/blog/Use-RDMA-Emulation-in-Software-Using-SoftiWARP/ https://www.reflectionsoft ...

  2. linux怎么开启telnet服务

    1>编辑telent的配置文件/etc/xinetd.d/telnet 如下: (设置disable = no,也就是开启telnet服务) service telnet { disable = ...

  3. [JZOJ NOIP2018模拟10.20 A组]

    由于T3数据出锅,还不清楚自己的分数...估分150,前100已经拿到了,T3的50没拍过(写的就是暴力怎么拍),感觉很不稳 考试的时候就是特别的困,大概是因为早上在房间里腐败...腐败完了才睡觉 T ...

  4. java高级——暴力反射

    反射,java中一个比较高级的应用,主要和开发中的框架紧密相连.今天我们就介绍一下他的特性之一,暴力反射.(听名字很恐怖呦) package wo; public class A{ public St ...

  5. Django(part2)

    admin site:django自带了admin site,我们需要创建能访问site的用户 #以交互的方式创建超级用户 manage.py createsuperuser 如果要把model加到a ...

  6. [转]Adobe CC 2018 下载链接 Creative Cloud 2018 - Creative Cloud 2018 – Adobe CC 2018 Download Links

    Creative Cloud 2018 – Adobe CC 2018 Download Links – ALL Languages Adobe CC 2018Direct Downloads Win ...

  7. 【算法】单源最短路径和任意两点最短路径总结(补增:SPFA)

    [Bellman-Ford算法] [算法]Bellman-Ford算法(单源最短路径问题)(判断负圈) 结构: #define MAX_V 10000 #define MAX_E 50000 int ...

  8. sql server2008怎么给一张表加一个用户

    有时候我们要对数据库进行权限管理,防止有人误操作或者窃取数据,那么小编这篇文章就是实现这个的操作过程. 百度经验:jingyan.baidu.com 工具/原料   sql server2008数据库 ...

  9. SpringCloud学习笔记(20)----Spring Cloud Netflix之服务网关Zuul的各种姿势

    1. 禁用过滤器 # zuul.<SimpleClassName>.<filterType>.disable=true # 例如禁用 自定义的过滤器 zuul.MyFilter ...

  10. css 禁止文本被选中复制代码

    css 禁止文本被选中复制代码: .cus-text{ -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none ...