zoukankan      html  css  js  c++  java
  • GoldenGate 反向切换步骤

    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 源端启用应用,回切完成

  • 相关阅读:
    原生内存泄漏检测
    安卓适配
    游戏里的动态阴影-ShadowMap实现原理
    游戏里的跨地图寻路算法
    Unity-Shader-动态阴影(上) 投影的矩阵变换过程
    Unity-奥义技能背景变黑效果
    UGUI学习笔记
    Unity-Shader-镜面高光Phong&BlinnPhong-油腻的师姐在哪里
    Unity-Shader-光照模型之漫反射
    Unity3D-Shader-热扭曲效果
  • 原文地址:https://www.cnblogs.com/l10n/p/7529148.html
Copyright © 2011-2022 走看看