Check OGG  until no data queuing in replication process:
testRO:
a)login  test5 –l oggmgr
b)ogg
c)#ggsci> lag *
check lag=0
{note: when check lag result = 0, proceed next step]  [GGSCI的lag命令可以查询复制延迟, 如:    GGSCI> lag <replicat>]
(At EOF, no more records to process.)

Stop  OGG   replication process: [目标段停下replication]
testRO:
a)login test5 –l oggmgr
b)ogg
c)ggsci>stop rpttestpr

Deactivate the current configuration file on primary server
a)login test4 –l oggmgr         [原端删除trandata,并且使用初始化配置重启extractor]
Choose testPR
  ggsci> dblogin userid gguser, password gguser_123q
a)ggsci>delete trandata testdata.*            
b)ggsci>stop er *!
cd  /testprdb/ogg/dirprm/
cp ertestpr.prm  ertestpr.201701
cp  ertestpr_sc.prm  ertestpr.prm
c)Activate the new configuration file “newfilename1
ggsci> start er *

Schema change on testpr           [表结构变更,原库和目标库都做]
a) login test4 -l oracle
Choose testpr
$cd /testprdb/change/schema/test/2016_10_09_test_4_4_3
$appl_schema_change.sh
b) check log for any errors (vi */*/*/rollout/log/01*.log)

Schema change on testro
a) login test5 -l oracle
Choose testRO
$cd /testrodb/change/schema/test/2016_10_09_test_4_4_3
$appl_schema_change.sh
b) check log for any errors (vi */*/*/rollout/log/01*.log)

Schema change on testhis
a) login test4 -l oracle
Choose testhis
$cd /testhisdb/change/schema/hdb/2016_10_10_test_4_3_18
$appl_schema_change.sh
b) check log for any errors (vi */*/*/rollout/log/01*.log)

Disable FK and check constraints in read-only DB:nGenROA
login test5 -l  OGGMGR                     [目标段 禁用主建检查和外建检查]
Choose  testRO
cd /home/oracle/ogg/RO/scripts
SQL>@gen_dcons_test.sql
SQL>@dcons.sql
SQL>exit

Activate the current configuration file on primary server (testPR)
a)login test4 –l oggmgr                    [重新启动原端的extractor,并重新加入trandata ]
Choose testPR
  ggsci> dblogin userid gguser, password gguser_123q
a)ggsci>add trandata testdata.*
b)ggsci> stop er *!
cd  /testprdb/ogg/dirprm/
cp  ertestpr.201701 ertestpr.prm
c)Activate the new configuration file “newfilename1
ggsci> start er *
Check OGG  until no data queuing in replication process:

testRO:                                     [重新启动目标段的extractor,观察lag ]
a)login test5 –l oggmgr
b)ogg
c)ggsci>start rpttestpr
c)#ggsci>lag *
check lag=0
d)stats rpttestpr
 ggsci>STATS RPTMCSPR latest,totalsonly *.*
{note: when check lag result = 0, proceed next step]