REPLICAT rep1
ASSUMETARGETDEFS
USERID ogg, PASSWORD ogg
discardfile ./dirdat/rep1_discard.txt,append,megabytes 5
DDL INCLUDE MAPPED
DDLOPTIONS REPORT
--BATCHSQL
DBOPTIONS DEFERREFCONST
DBOPTIONS LOBWRITESIZE 102400
HANDLECOLLISIONS
DDLERROR DEFAULT DISCARD RETRYOP MAXRETRIES 5 RETRYDELAY 20
--grouptransops 1
--maxtransops 1
APPLYNOOPUPDATES
MAP linuxidc.*, TARGET linuxidc.*;
Source:
将版本控制参数 format release去掉
GGSCI (linuxidc1) 44> view param ext1
EXTRACT EXT1
setenv ( NLS_LANG = AMERICAN_AMERICA.ZHS16GBK )
USERID ogg,PASSWORD ogg
DDL &
INCLUDE MAPPED OBJTYPE 'TABLE' &
INCLUDE MAPPED OBJTYPE 'IDNEX' &
INCLUDE MAPPED OBJTYPE 'SEQUENCE' &
INCLUDE MAPPED OBJTYPE 'VIEW' &
INCLUDE MAPPED OBJTYPE 'PROCEDURE' &
INCLUDE MAPPED OBJTYPE 'FUNCTION' &
INCLUDE MAPPED OBJTYPE 'PACKAGE' &
INCLUDE MAPPED OBJTYPE 'MATERIALIZED VIEW' &
EXCLUDE OPTYPE COMMENT
DDLOPTIONS ADDTRANDATA NOCROSSRENAME REPORT
REPORTCOUNT EVERY 1 MINUTES,RATE
DISCARDFILE ./dirrpt/EXTSA.DSC,APPEND,MEGABYTES 1024
THREADOPTIONS MAXCOMMITPROPAGATIONDELAY 60000 IOLATENCY 60000
DBOPTIONS ALLOWUNUSEDCOLUMN
WARNLONGTRANS 2H,CHECKINTERVAL 3M
--exttrail ./dirdat/sa,format release 11.1
exttrail ./dirdat/sa
FETCHOPTIONS NOUSESNAPSHOT,FETCHPKUPDATECOLS,MISSINGROW REPORT
table linuxidc.*;
GGSCI (linuxidc1) 45> view param ext2
EXTRACT EXT2
passthru
RMTHOST 192.168.56.61,MGRPORT 7839,COMPRESS
--RMTTRAIL ./dirdat/sa,format release 11.1
RMTTRAIL ./dirdat/sa
table linuxidc.*;
因为版本问题,以前trail文件将不可用,迫使抽取进程写一个新的trail文件:
GGSCI (linuxidc1) 47> alter extract ext1 etrollover
GGSCI (linuxidc1) 25> alter extract ext2 etrollover
2015-03-06 01:26:06 INFO OGG-01520 Rollover performed. For each affected output trail of Version 10 or higher format, after starting the source extract, issue ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's scan to the new trail file; it will not happen automatically.
EXTRACT altered.
start mgr
start ext1
GGSCI (linuxidc1) 39> alter extract ext2, EXTSEQNO 1, EXTRBA 0
EXTRACT altered.
GGSCI (linuxidc1) 40> start ext2
Sending START request to MANAGER ...
EXTRACT EXT2 starting
GGSCI (linuxidc1) 41> info ext2
EXTRACT EXT2 Last Started 2015-03-06 01:46 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:10 ago)
Log Read Checkpoint File /ogg/dirdat/sa000001
First Record RBA 0
Target:
GGSCI (linuxidc2) 4> alter REPLICAT rep1, EXTSEQNO 1, EXTRBA 0
REPLICAT altered.
GGSCI (linuxidc2) 5> start rep1
Sending START request to MANAGER ...
REPLICAT REP1 starting
GGSCI (linuxidc2) 6> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING REP1 00:00:00 00:00:08
GGSCI (linuxidc2) 7> info rep1
REPLICAT REP1 Last Started 2015-03-06 01:43 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:00 ago)
Log Read Checkpoint File /ogg/dirdat/sa000001
First Record RBA 0
start mgr
start rep1
自此ogg目标端升级成功