DBA _ Oracle Golden Gate 12 – Bidirectional Replication _ Activ

  • Upload
    wishnew

  • View
    230

  • Download
    0

Embed Size (px)

Citation preview

  • 8/17/2019 DBA _ Oracle Golden Gate 12 – Bidirectional Replication _ Activ

    1/14

    DBAHome Scripts Backup and Recovery Oracle Database

    Friday, December 26, 2014

    Oracle Golden Gate 12 – Bidirectional replication / Active ActiveReplication !it" #on$lict Detection and Resolution

    In this document, we will see the bi-directional replication using Oracle olden ate 12 on Oracle 12c database!

    In O bi directional replication, we need to understand which ob"ects are supported and which are not!

      a ! #rimary $ey

     % #rimary $ey is used to identi&y and resol'e con&licts! (a)e sure e'ery table to be included in the replication has a #rimary $ey!

      b! *e+uences are not supported in i-Directional eplication! .e must deploy one o& the methods below to o'ercome it!

    i! ODD/

    ii! %

    iii!3O3%%

      c! rigger causes uni+ueness issues! .e must do the &ollowing to o'ercome them!

    i! .e must disable the triggers on the target or use O to suppress them!

    ii! *peci&y the DO#IO* *5##**I* parameter in tract parameter &ile when using oldenate 'ersion 10!2!0!4 or

    11!2!0!2 or 12!1!2!1

      d! Data 7ooping

    In a i-Directional replication con&iguration, each side processes transaction acti'ely! For Insert transactions it can cause uni+ueness

    issues and &or updates it can spawn into an in&inite loop!

    o a'oid data looping speci&y the &ollowing parameters should be used in tract process, on both databases!

    %7OO#IO* 8375D5* 9:5*;

    O

    %7OO#IO* 8375D5* 9oracle:uid;

      e! 53% able

    runcate table operations are not detected by data looping! .e must t runcate tables only in one database! .e can accomplish it by

    one o& the &ollowing ways<

    i! 3ontrol user access using pri'ileges so that they can truncate tables only in one direction!

    O

    ii! *peci&y the parameter =G%&&R'(#A&%> &rom source to target and = )G(OR%&R'(#A&%* &rom target to source!

      &! 7%

    Oracle oldenate is an %synchronous solution! It is possible that there may be 7% at times depending on the transaction 'olume or

    networ) issue or when processes are down! his 7% can cause data inconsistencies! o a'oid this situation ma)e sure that there is

    'ery little or no 7% or ha'e proper *7%s!

      g ! O 3OF7I3*

    3on&licts are 'ery common and born to happen in i-Directional eplication as Oracle oldenate is an %synchronous solution!

    .e will see the &ollowing &our di&&erent con&licts in O replication!

    i! 3OF7I3 FO I**

    ii! 3OF7I3 FO 5#D%*

    iii! 3OF7I3 FO D7*

    i'! 3OF7I3 FO 5#D%/D7

      h! imestamp 3olumn

     % #rimary $ey alone is O su&&icient to handle con&licts! .e must use another column or combination o& columns to handle con&licts! % imestamp column stores the commit time o& the D(7! his column can be populated with the help o& %pplication or a rigger! .e

    will ma)e use o& timestamp column along with the #rimary $ey column to identi&y and resol'e con&licts!

    (a)e sure e'ery table part o& replication ha'e a column with timestamp or date data type!

      i! 3on&lict Detection %nd esolution

    *tart with O 'ersion 11!2, Oracle has pro'ided built-in 3Ds! hese built-in 3Ds can be used in O 11!2! .e will use

    =R%SO+,%#O(-+)#&> parameter o& (%# statement to resol'e con&licts !

    ?! 7imitations

    i-Directional eplication wor)s only on .indows, 5I8/7inu!

    3D wor)s with numeric, date/timestamp colums and char/'archar2 only!

    %3@*A7 is not supported in i-Directional eplication!

    7O , %bstract data type B%DC and 5ser De&ined data type B5DC are O supported with 3D!

    4! IO( D%I7**ource

    *er'er I#< 10!10!1!10

    Database ame< ggsource

    Database ersion< 12!1!0!2!1

    'ersion< 12!1!2!1!0

    Searc" &"is Blo.

    San deep

    Follow   6

    iew my complete

    About e

    201E B1C

    2014 B46C

    December B1C

    Oracle olden ate 12 Gidirectional replication !!!

    *eptember B?C

     %ugust B1C

    Huly B4C

    Hune B14C

    (ay B2?C

    Blo. Arc"ive

    @ome

    *cripts

    Oracle Database

    ac)up andeco'ery

    0a.es

    (ore et log

  • 8/17/2019 DBA _ Oracle Golden Gate 12 – Bidirectional Replication _ Activ

    2/14

    Target

    Server IP : 10.10.1.20

    Database Name: ggtarget

    Database Version: 12.1.0.2.1

    GG version: 12.1.2.1.0

      1. Login to edelivery.oracle.com Select te !rod"ct and version.

      2. Do#nload GoldenGate V 12.1.2.1.0

      $. %n bot so"rce and target servers& create directories to store te Golden gate.

    'oracle(T)ST01 "02*+ m,dir -! "02a!!oracle!rod"ctgg

    'oracle(T)ST01 "02*+ cmod // "02a!!oracle!rod"ctgg

    'oracle(T)ST02 "02*+ m,dir -! "02a!!oracle!rod"ctgg

    'oracle(T)ST02 "02*+ cmod // "02a!!oracle!rod"ctgg

    . Transer and "n3i! te installable do#nloaded.

    'oracle(T)ST01 "02*+ cd "02a!!oracle!rod"ctgg

    'oracle(T)ST01 gg*+ "n3i! V445.3i!

    'oracle(T)ST02 "02*+ cd "02a!!oracle!rod"ctgg

    'oracle(T)ST02 gg*+ "n3i! V445.3i!

      . 6ntar te tar ile.

      4. 7reate a directory or !lacing te discard iles.

    'oracle(T)ST01 gg*+ m,dir discard

    'oracle(T)ST02 gg*+ m,dir discard

      /. Set "! te !at or Golden gate in .bas8!roile

    e9!ort LD8LI;

  • 8/17/2019 DBA _ Oracle Golden Gate 12 – Bidirectional Replication _ Activ

    3/14

      9. Now, let us prepare database for Golden Gate replication.

    Login to the database with user having ALTER SSTE! privileges"

    a# $e need to put the database in archivelog %ode b& starting the database in %ount %ode.

    S'L( startup %ount

    )RA*LE instance started.

    Total S&ste% Global Area +-9/0 b&tes

    1i2ed Si3e 4945-64 b&tes

    7ariable Si3e 909059/+4 b&tes

    8atabase uffers 5/++4 b&tes

    Redo uffers +/0056 b&tes

    8atabase %ounted.

    b# S'L( alter database archivelog"

    8atabase altered.

    c# )pen the database

    S'L( alter database open"

    8atabase altered.

    d# S'L( alter database add supple%ental log data"

    8atabase altered.

    e# Now, we need to ensure redo and archive logs are having supple%ental log data.

    f# Now, switch the log files.

    S'L( alter s&ste% switch logfile"

    g# *onfir% fro% the database whether supple%ental logging is enabled.

    S'L( select S:;;LE!ENTAL

    create user gg

  • 8/17/2019 DBA _ Oracle Golden Gate 12 – Bidirectional Replication _ Activ

    4/14

    ou will be pro%pted for the na%e of a sche%a for the )racle GoldenGate database obects.

    N)TEH 1or an )racle +-g source, the s&ste% rec&cle bin %ust be disabled. 1or )racle ++g and later, it can be enabled.

    N)TEH The sche%a %ust be created prior to running this script.

    N)TEH Stop all 88L replication before starting this installation.

    Enter )racle GoldenGate sche%a na%eHgg_admin

    $orBing, please wait ...

    Spooling to file ddl

  • 8/17/2019 DBA _ Oracle Golden Gate 12 – Bidirectional Replication _ Activ

    5/14

    ???????????????????????????????????????? ?????????????????????????????????????????????????????????????????

    No errors No errors

    SS.88L*TJ=N1) ;A*IAGE )8 STAT:SH

    Line@pos Error 

    ???????????????????????????????????????? ?????????????????????????????????????????????????????????????????

    No errors No errors

    88L K=ST)R TALE

    ???????????????????????????????????

    )I

    88L K=ST)R TALED+#

    ???????????????????????????????????

    )I

    88L 8:!; TALES

    ???????????????????????????????????

    )I

    88L 8:!; *)L:!NS

    ???????????????????????????????????

    )I

    88L 8:!; L)G GR):;S

    ???????????????????????????????????

    )I

    88L 8:!; ;ART=T=)NS???????????????????????????????????

    )I

    88L 8:!; ;R=!AR IES

    ???????????????????????????????????

    )I

    88L SE':EN*E

    ???????????????????????????????????

    )I

    GGS

  • 8/17/2019 DBA _ Oracle Golden Gate 12 – Bidirectional Replication _ Activ

    6/14

    Script complete.

    SQL> @role_setup.sql

    GGS Role setup script

    This script will drop and recreate the role GGS_GGSUSER_ROLE

    To use a different role name, quit this script and then edit the params.sql script to change the gg_role parameter to the preferred

    name. (Do not run the script.

    !ou will "e prompted for the name of a schema for the GoldenGate data"ase o"#ects.

    $%T&' The schema must "e created prior to running this script.

    $%T&' Stop all DDL replication "efore starting this installation.

    &nter GoldenGate schema name'gg_admin

    rote file role_setup_set.t)t

    *L+SQL procedure successfull completed.

    Role setup script complete

    Grant this role to each user assigned to the &)tract, GGS-, and /anager processes, " using the following SQL command'

    GR0$T GGS_GGS1S&R_R%L& T% 2logged1ser3

    where 2logged1ser3 is the user assigned to the GoldenGate processes.

    4444444SQL3 GRANT GGS_GGSUSER_ROLE TO gg_admin;

    Grant succeeded.

    SL> @ddl_ena!le.sql

    Trigger altered.

      56. $ow, to set up "i4directional replication, we need the following.

    %n Site GGS%1R-&, we will ha7e the following groups created

    8 &)tract 9 e)t5

    8 Data *ump 9 dpump5

    8 Replicat 9 rep5

    %n Site GGT0RG&T, we will ha7e the following groups created

    8 &)tract 9 e)t:

    8 Data *ump 9 dpump:

    8 Replicat 9 rep:

    %n Site GGS%1R-&, we ha7e the following trails set up

    8 aa 9 local e)tract trail which w ill "e written to " e)t5

    8 a" 9 remote trail which will "e processed " data pump e)tract group dpump5. This will "e shipped o7er the networ; to Site

    GGT0RG&T

    %n Site GGT0RG&T, we ha7e the following trails set up

    8 ac 9 local e)tract trail which will "e written to " e)t:

    8 ad 9 remote trail which will "e processed " data pump e)tract group dpump:. This will "e shipped o7er the networ; to Site

    GGS%1R-&

      5 and create a ta"le under GG>.

    %n source and target, create a user as "elow.

    SQL3 create user gg"i identified " gg"i?

    %n Source and target data"ase, create a ta"le GG&/* under GG>.

    SQL3 create ta"le ggemp

    (emp_id num"er,

    emp_name_name 7archar:(:@,

    mgr num"er,

    last_dml timestamp default sstimestamp?

    SQL3 alter ta"le ggemp add constraint p;_ggemp primar ;e (emp_id ?

    Ta"le altered.

    SQL3 grant all on ggemp to gg_admin?

    Grant succeeded.

    SQL3 -R&0T& %R R&*L0-& TRGG&R GG&/*_-DR_TRG

    >&=%R& 1*D0T& or insert

    %$ GG>.GG&/*

  • 8/17/2019 DBA _ Oracle Golden Gate 12 – Bidirectional Replication _ Activ

    7/14

    REFERENCING NEW AS New OLD AS Old

    FOR EACH ROW

    BEGIN

    IF SYS_CONTEXT ('USERENV', 'SESSION_USER') ! 'GG_ADIN'

    THEN

    "NEW#LAST_DL " SYSTIESTA$%

    END IF%

    END%

    &

    # Ce*+e +e e-+*.+ (EXT) */d d*+* 0120 (D$U$) 3/ S4+e GGSOURCE

    GGSCI (TEST5) 6 *dd e-+*.+ e-+ +*/l37 8e74/ /3w

    EXTRACT *dded#

    GGSCI (TEST5) 96 *dd e-++*4l &15:&*00&3*.le&03d1.+&77&d4d*+&** e-+*.+ e-+

    EXTTRAIL *dded#

    GGSCI (TEST5) ;6 *dd e-+*.+ d0120 e-++*4lEYINCLUDING (e20_/*2e_/*2e,27,l*EYINCLUDING (e20_/*2e_/*2e,27,l*

  • 8/17/2019 DBA _ Oracle Golden Gate 12 – Bidirectional Replication _ Activ

    8/14

    EXTRACT dpump2

    USERID gg_admin, PASSWORD gg_admin

    RMTHOST 10.10.1.10, MGRPORT !0", TCP#U$SI%E 100000

    RMTTRAI& 'u02'app'()a*+'p)(du*-'gg'di)da-'ad

    PASSTHRU

    TA#&E ggi.ggmp/

    1!. On GGSOURCE i-, add )p+i*a- REP1

    GGSCI TEST01 !3 add )p+i*a- )p1 4--)ai+ 'u02'app'()a*+'p)(du*-'gg'di)da-'adREP&ICAT addd

    GGSCI TEST02 "3 di- pa)am )p1

    REP&ICAT )p1

     ASSUMETARGETDE$S

    USERID gg_admin, PASSWORD gg_admin

    DISCARD$I&E 'u02'app'()a*+'p)(du*-'gg'di*a)d'di*a)d)p1.-4-, appnd,

    MAP ggi.ggmp, TARGET ggi.ggmp/

    1". On (-5 GGSOURCE and GGTARGET i- , add -)anda-a .

    GGSCI TEST01 123 dblogin userid gg_admin,password gg_admin

    Su**6u++7 +(ggd in-( da-aa.

    GGSCI TEST01 a gg_admin8gg(u)* 193 add trandata ggbi.ggemp *(+mp_nam_nam,mg),+a-_dm+

    &(gging (6 upp+mn-a+ )d( da-a na+d 6() -a+ GG#I.GGEMP.

    TRA:DATA 6() *5du+ing *(+umn 5a n addd (n -a+ ;GG#I.GGEMP;.

    GGSCI TEST01 a gg_admin8gg(u)* 1()d gg_admin

    Su**6u++7 +(ggd in-( da-aa.

    GGSCI TEST02 a gg_admin8gg-a)g- 113 add -)anda-a ggi.ggmp *(+mp_nam_nam,mg),+a-_dm+

    &(gging (6 upp+mn-a+ )d( da-a na+d 6() -a+ GG#I.GGEMP.

    TRA:DATA 6() *5du+ing *(+umn 5a n addd (n -a+ ;GG#I.GGEMP;.GGSCI TEST02 a gg_admin8gg-a)g- 123 in6( -)anda-a ggi.ggmp

    &(gging (6 upp+mn-a+ )d( +(g da-a i na+d 6() -a+ GG#I.GGEMP.

    C(+umn upp+mn-a++7 +(ggd 6() -a+ GG#I.GGEMP= EMP_ID, EMP_:AME_:AME, &AST_DM&, MGR.

    20. S-a)- -5 E4-)a*- and Da-a Pump p)(* in GGSOURCE

    GGSCI TEST01 a gg_admin8gg(u)* 1?3 start extract ext1

    Snding START )@u- -( MA:AGER ...

    EXTRACT EXT1 -a)-ing

    GGSCI TEST01 a gg_admin8gg(u)* 13 start extract dpump1

    Snding START )@u- -( MA:AGER ...

    EXTRACT DPUMP1 -a)-ing

    GGSCI TEST01 a gg_admin8gg(u)* 1!3 info extract ext1

    EXTRACT EXT1 &a- S-a)-d 2019111 2B=B< S-a-u RU::I:G

    C5*p(in- &ag 00=00=00 upda-d 00=00=09 ag(

    P)(* ID B0100

    &(g Rad C5*p(in- O)a*+ Rd( &(g

      2019111 2B=B

    &(g Rad C5*p(in- $i+ 'u02'app'()a*+'p)(du*-'gg'di)da-'aa000000

      $i)- R*()d R#A 0

  • 8/17/2019 DBA _ Oracle Golden Gate 12 – Bidirectional Replication _ Activ

    9/14

    GGSCI (TEST01 as gg_admin@ggsource) 20> info all

    Program Status Grou !ag at C"#t Time Since C"#t

    $%&%GE' '&&I&G

    ET'%CT '&&I&G *P$P1 00+00+00 00+00+00

    ET'%CT '&&I&G ET1 00+00+00 00+00+01

    'EP!IC%T ST,PPE* 'EP1 00+00+00 00+00+--

    21. Start t"e E/tract and *ata Pum rocess in GGT%'GET

    GGSCI (TEST02 as gg_admin@ggtarget) 1> start e/tract e/t2

    Sending ST%'T reuest to $%&%GE' ...

    ET'%CT ET2 starting

    GGSCI (TEST02 as gg_admin@ggtarget) 1-> start e/tract dum2

    Sending ST%'T reuest to $%&%GE' ...

    ET'%CT *P$P2 starting

    GGSCI (TEST02 as gg_admin@ggtarget) 1> info all

    Program Status Grou !ag at C"#t Time Since C"#t

    $%&%GE' '&&I&G

    ET'%CT '&&I&G *P$P2 00+00+00 00+1+3

    ET'%CT '&&I&G ET2 00+00+00 00+00+00'EP!IC%T ST,PPE* 'EP2 00+00+00 00+14+21

    22. ,n GGS,'CE5 start t"e relicat ('EP1) rocess.

    GGSCI (TEST01 as gg_admin@ggsource) 2> start relicat re1

    Sending ST%'T reuest to $%&%GE' ...

    'EP!IC%T 'EP1 starting

    GGSCI (TEST01 as gg_admin@ggsource) 2-> info all

    Program Status Grou !ag at C"#t Time Since C"#t

    $%&%GE' '&&I&G

    ET'%CT '&&I&G *P$P1 00+00+00 00+00+03

    ET'%CT '&&I&G ET1 00+00+00 00+00+06'EP!IC%T '&&I&G 'EP1 00+00+00 00+00+0-

    2. ,n GGT%'GET 5 add c"ec#ointta7le and start t"e relicat ('EP2) rocess .

    GGSCI (TEST02 as gg_admin@ggtarget) 22> add checkpointtable gg_admin.ckptab

    Successfull8 created c"ec#oint ta7le gg_admin.c#ta7.

    GGSCI (TEST02 as gg_admin@ggtarget) 2> start relicat re2

    Sending ST%'T reuest to $%&%GE' ...

    'EP!IC%T 'EP2 starting

    GGSCI (TEST02 as gg_admin@ggtarget) 2-> info all

    Program Status Grou !ag at C"#t Time Since C"#t

    $%&%GE' '&&I&G

    ET'%CT '&&I&G *P$P2 00+00+00 00+00+04

    ET'%CT '&&I&G ET2 00+00+00 00+00+0

    'EP!IC%T '&&I&G 'EP2 00+00+00 00+00+02

    Test Scenario 1

    ,n GGS,'CE5 inserted a ro9 and found t"at t"e ro9 is relicated on GGT%'GET.

    S:!> select name from ;

  • 8/17/2019 DBA _ Oracle Golden Gate 12 – Bidirectional Replication _ Activ

    10/14

    SQL> select * from ggemp;

      EMP_ID EMP_NAME_NAME MGR LAST_DML

    ---------- -------------------- ---------- ---------------------------------------------------------------------------

      1 gole!g"te 1## 1$-N%&-1' 11()#('(+),' PM

    SQL> select !"me from ./"t"0"se;

    NAME

    ---------GGTARGET

    SQL> select * from ggemp;

      EMP_ID EMP_NAME_NAME MGR LAST_DML

    ---------- -------------------- ---------- ---------------------------------------------------------------------------

      1 gole!g"te 1## 1$-N%&-1' 11()#('(+),' PM

    Test Sce!"ro

    %! GGTARGET2 3e "re !sert!g " ro3 2 t4s ro3 s4o5l 0e replc"te o! GGS%6R7E(

    SQL> !sert !to ggemp ."l5es 829or"cle921#12s:s"te;

    1 ro3 cre"te(

    SQL> commt;

    7ommt complete(

    SQL> select * from ggemp;

      EMP_ID EMP_NAME_NAME MGR LAST_DML

    ---------- -------------------- ---------- ---------------------------------------------------------------------------

      1 gole!g"te 1## 1$-N%&-1' 11()#('(+),' PM

      or"cle 1#1 1$-N%&-1' 11()#())(,#, select * from ggemp;

      EMP_ID EMP_NAME_NAME MGR LAST_DML

    ---------- -------------------- ---------- ---------------------------------------------------------------------------

      1 gole!g"te 1## 1$-N%&-1' 11()#('(+),' PM

      or"cle 1#1 1$-N%&-1' 11()#())(,#,

  • 8/17/2019 DBA _ Oracle Golden Gate 12 – Bidirectional Replication _ Activ

    11/14

    RESOLVECONFLICT – This will be used in MAP statement to different resolutions for different conflict resolutions.

    In our setup, we have 2 databases ( GG!"#$% and GGTA#G%T &and we need to have the chan'es to be replicated from

    both the sites.

    ata Pump and %)tract Trail file setup remains same as per the setup for Active*Active replication without $#.

    On GGSOURCE

    +. The e)tract (%T+& parameter file will be follows.

    GG$I (T%T-+& / edit params e)t+%T#A$T e)t+

    "%#I ''0admin, PA1!# ''0admin

    %TT#AI 3u-23app3oracle3product3''3dirdat3aa

    T#A4!G!PTI!4 %$"%"%# ''0admin

    TA5% ''bi.''emp,

    G%T5%6!#%$! (

    !4 "PAT% 7%8I4$"I4G (emp0name0name,m'r,last0dml&,

    !4 %%T% 7%8I4$"I4G (emp0name0name,m'r,last0dml&&9

    2. The #eplicat process on GG!"#$% server will be as follows.

    GG$I (T%T-+& :/ edit params rep+

    #%PI$AT rep+

     A"M%TA#G%T%6

    "%#I ''0admin, PA1!# ''0admin

    I$A#6I% 3u-23app3oracle3product3''3discard3discardrep+.t)t, append,

    MAP ''bi.''emp, TA#G%T ''bi.''emp,

    $!MPA#%$! (!4 "PAT% A, !4 %%T% A&,

    #%!;%$!46I$T ("PAT%#!1%IT, (%6A"T, "%MA (M0TIM%TAMP&&&,#%!;%$!46I$T (I4%#T#!1%IT, (%6A"T, "%MA (M0TIM%TAMP&&&,

    #%!;%$!46I$T (%%T%#!1%IT, (%6A"T, IG4!#%&&,

    #%!;%$!46I$T ("PAT%#!1MII4G, (%6A"T, !;%#1#IT%&&,

    #%!;%$!46I$T (%%T%#!1MII4G, (%6A"T, I$A#&&9

    On GGTARGET

    row missin', then overwrite or an> row is missin', it should discard while deletin'.

    Test Scenario 3

    et us update the row from both GG!"#$% and GGTA#G%T with different values and see the latest values are updated.

    !n GGTA#G%T, I am updatin' the MG# column from +-? to +-@ and in GG!"#$%, I am updatin' from +-? to +- at same time,

    the values in both the database should be +-@ as GGTA#G%T is havin' latest timestamp.

    !n GG!"#$%,

    B/ select C from ''emp9

      %MP0I %MP04AM%04AM% MG# AT0M

    ********** ******************** ********** ***************************************************************************

      + 'olden'ate +-- +*4!;*+= ++.-.2=.?:=2@ PM

      2 oracle +-2 +@*4!;*+= -.+=.2+.=-=+2 PM

      < ''test +-? +@*4!;*+= -?.-?.=.?:+: PM

  • 8/17/2019 DBA _ Oracle Golden Gate 12 – Bidirectional Replication _ Activ

    12/14

    SQL> update ggemp set mgr=108 where emp_id=3;

    1 row updated.

    SQL> commit;

    Commit complete.

    O !!"#$!%"

    SQL> select & 'rom ggemp;

      %()_*+ %()_,#(%_,#(% (!$ L#S"_+(L

    ---------- -------------------- ---------- ---------------------------------------------------------------------------

      1 goldegate 100 1-,O/-1 11.0.2.428 )(

      2 oracle 102 18-,O/-1 0.1.21.012 )(

      3 ggtest 10 18-,O/-1 0.0..414 )(

    SQL> update ggemp set mgr=108 where emp_id=3;

    1 row updated.

    SQL> commit;

    Commit complete.

    $esult

    ,ow5 the output o' !!SO6$C% ad !!"#$!%" shows the 'ollowig.

    SQL> select & 'rom ggemp;

      %()_*+ %()_,#(%_,#(% (!$ L#S"_+(L

    ---------- -------------------- ---------- ---------------------------------------------------------------------------

      1 goldegate 100 1-,O/-1 11.0.2.428 )(

      2 oracle 102 18-,O/-1 0.1.21.012 )(

      3 ggtest 108 18-,O/-1 0.0.3.34242 )(

    "est Sceario

    ,ow5 * am goig to delete same record 'rom 7oth the sites.

    a. *itiall5 * am deletig 'rom !!SO6$C% ad !!"#$!%" at same time ad commitig.

    O !!SO6$C%

    SQL> select & 'rom ggemp;

      %()_*+ %()_,#(%_,#(% (!$ L#S"_+(L

    ---------- -------------------- ---------- ---------------------------------------------------------------------------

      1 goldegate 100 1-,O/-1 11.0.2.428 )(

      ggoracle 110 18-,O/-1 0.2.20.4314 )(

      3 ggtest 108 18-,O/-1 0.0.3.34242 )(

    SQL> delete 'rom ggemp where emp_id=;

    1 row deleted.

    SQL> commit;

    Commit complete.

    O !!"#$!%"

      SQL> delete 'rom ggemp where emp_id=;

      1 row deleted.

      SQL> commit;

    ,ow5 sice !!SO6$C% timestamp is proceeded earlier ad deleted the record5 the other delete statemet ' rom !!"#$!%" got

    discarded.

    "his ca 7e see i the trail ' ile.

    Operatio9 3 %rror9 103

    Operatio 'ailed at se:o 0 r7a 330

    +iscardig record o C+$ +*SC#$+ resolutio

    $ecord ot 'oud

    Aborted delete from GGBI.GGEMP to GGBI.GGEMP (target format)...

    &

    %()_*+ =

    0000009 3

    %()_,#(%_,#(% = ggoracle

  • 8/17/2019 DBA _ Oracle Golden Gate 12 – Bidirectional Replication _ Activ

    13/14

    Newer Post Older PostHome

    Subscribe to: Post Comments (Atom)

    Posted by San deep at 3:31 AM

    : !" !" !# "$ !1 !3 !c !% &''oracle &

    Recommend this on Google

    Enter your comment...

    Comment as: Select pro#ile

    Publish Preview

    6 comments:

    Murthy une $*+ $1% at !:*$ AM

    Hi

    Ha,e you per#ormed -nitial load be#ore t.e abo,e steps or you .a,e cloned source database to tar'et .as your initial load/

    i am 'ettin' error in my tar'et side statin' table doesnot e0ist and replicat is 'ettin' abended

    - remember in 11 ,ersion 'olden 'ate e did initial load #irst be#ore started our processes

    2indly con#irm

    eply

    suraj September !+ $1% at ":1% PM

    Hi Murt.y+

    Can you tell me w.at operation on source you are per#ormin'/

    eply

    Murthy September 1!+ $1% at 11:4 AM

    -ts 'oin' to be acti,e acti,e e will be doin' 5M6 operations Mostly -nserts

    eply

    Joseph A. Wallace October 1+ $1% at 11:1! AM

    -t was so nice article- was really satisi#ied by seein' t.is article and we are also 'i,in' Oracle online trainin'7.e Oracle online

    trainin' is one o# t.e best Oracle online trainin' institute in 8SA

    eply

    Cat Minds October 1+ $1% at 11:$% AM

    eply

    Cat Minds October 1+ $1% at 11:$" AM

    e are pro,idin' best Oracle 9olden 9ate Online trainin'  in usa at ,ery reaposable price wit. Adit.yaelearnin' e will

    pro,ide you well e0pert teac.er and en,ironment #or your learnin'

    eply

  • 8/17/2019 DBA _ Oracle Golden Gate 12 – Bidirectional Replication _ Activ

    14/14

     Awesome -nc template Powered by lo''er