标签:select following delay starting content post ssi value dex
首先创建測试表,22节点: create table ggtb22 (id number primary key , name varchar2(20),sal number) ; SQL> create table ggtb22 (id number primary key , name varchar2(20),sal number) ; Table created. 23节点: create table ggtb23 (id number primary key , name varchar2(20),salyear number) ; SQL> create table ggtb23 (id number primary key , name varchar2(20),salyear number) ; Table created.
GGSCI (oel51) 11> dblogin userid ggs password ggs Successfully logged into database. GGSCI (oel51) 12> add trandata dexter.ggtb22 Logging of supplemental redo data enabled for table DEXTER.GGTB22. GGSCI (oel52) 19> dblogin userid ggs password ggs Successfully logged into database. GGSCI (oel52) 20> add trandata ggtb23 ERROR: No viable tables matched specification.
[oracle@oel51 ogg]$ vi ./dirprm/defprmggtb22.prm defsfile ./dirdef/ggtb22.def USERID ggs, PASSWORD ggs TABLE dexter.ggtb22;
[oracle@oel51 ogg]$ ./defgen paramfile ./dirprm/defprmggtb22.prm *********************************************************************** Oracle GoldenGate Table Definition Generator for Oracle Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230 Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 05:08:19 Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved. Starting at 2016-03-12 02:00:02 *********************************************************************** Operating System Version: Linux Version #1 SMP Wed Feb 22 17:37:40 EST 2012, Release 2.6.32-300.10.1.el5uek Node: oel51 Machine: x86_64 soft limit hard limit Address Space Size : unlimited unlimited Heap Size : unlimited unlimited File Size : unlimited unlimited CPU Time : unlimited unlimited Process id: 13324 *********************************************************************** ** Running with the following parameters ** *********************************************************************** defsfile ./dirdef/ggtb22.def USERID ggs, PASSWORD *** TABLE dexter.ggtb22; Retrieving definition for DEXTER.GGTB22 Definitions generated for 1 table in ./dirdef/ggtb22.def
[oracle@oel51 ogg]$ scp ./dirdef/ggtb22.def 192.168.100.23:/u01/ogg/dirdef/ oracle@192.168.100.23‘s password: ggtb22.def 100% 1069 1.0KB/s 00:00
SourceDefs dirdef/ggtb22.def
extract extract eora setenv (NLS_LANG="AMERICAN_AMERICA.AL32UTF8") userid ggs, password ggs tranlogoptions dblogreader tranlogoptions excludeuser ggs threadoptions maxcommitpropagationdelay 20000 exttrail ./dirdat/bb dynamicresolution TABLE dexter.ggtb22 ; extract eora userid ggs, password ggs tranlogoptions dblogreader tranlogoptions excludeuser ggs threadoptions maxcommitpropagationdelay 20000 exttrail ./dirdat/aa dynamicresolution TABLE dexter.ggtb23 ; pump extract pora23 dynamicresolution userid ggs, password ggs rmthost 192.168.100.23, mgrport 7139,compress rmttrail ./dirdat/bb TABLE dexter.ggtb22 ; extract pora22 dynamicresolution userid ggs, password ggs rmthost 192.168.100.22, mgrport 7139,compress rmttrail ./dirdat/aa TABLE dexter.ggtb23 ; replicat replicat rora23 setenv (NLS_LANG="AMERICAN_AMERICA.ZHS16GBK") userid ggs, password ggs --assumetargetdefs SourceDefs ./dirdef/ggtb23.def handlecollisions reperror default,discard DISCARDFILE ./dirrpt/rora23.dsc, append, megabytes 100 dynamicresolution INSERTMISSINGUPDATES MAP dexter.ggtb23, TARGET dexter.ggtb22, COLMAP (USEDEFAULTS, SAL = @COMPUTE(SALYEAR / 12) NAME = @STRCAT(NAME,"HELLO")); replicat rora22 setenv (NLS_LANG="AMERICAN_AMERICA.AL32UTF8") userid ggs, password ggs --assumetargetdefs SourceDefs ./dirdef/ggtb22.def handlecollisions reperror default,discard DISCARDFILE ./dirrpt/rora22.dsc, append, megabytes 100 dynamicresolution INSERTMISSINGUPDATES MAP dexter.ggtb22, TARGET dexter.ggtb23, COLMAP (USEDEFAULTS, SALYEAR = @COMPUTE(SAL * 12) NAME = @STRCAT(NAME,"hello"));
SQL> insert into ggtb22 values (1,‘dex‘,10000) ; 1 row created. SQL> commit ; Commit complete. SQL> select * from ggtb22 ; ID NAME SAL ---------- -------------------- ---------- 1 dex 10000 SQL> select * from ggtb23 ; ID NAME SALYEAR ---------- -------------------- ---------- 1 dexhello 120000 SQL> insert into ggtb23 values (2 , ‘ter‘ , 10000) ; 1 row created. SQL> commit ; Commit complete. SQL> select * from ggtb23 ; ID NAME SALYEAR ---------- -------------------- ---------- 1 dexhello 120000 2 ter 10000 SQL> select * from ggtb22 ; ID NAME SAL ---------- -------------------- ---------- 2 terHELLO 833.333333 1 dex 10000
Goldengate 使用definition file完毕异构表同步
标签:select following delay starting content post ssi value dex
原文地址:http://www.cnblogs.com/ljbguanli/p/7077096.html