Oracle GoldenGate - DML Updates using GGSCI between 2 different schemas in the same database

DML Updates using GGSCI between 2 different schemas in the same database

GGSCI (YesB.in) 4> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING


GGSCI (YesB.in) 5> info mgr

Manager is running (IP port YesB.in.7809, Process ID 2930).


GGSCI (YesB.in) 6> dblogin userid ogg_user password oracle
Successfully logged into database.

GGSCI (YesB.in as ogg_user@TESTDB) 7> info trandata test1.emp

Logging of supplemental redo log data is disabled for table TEST1.EMP.

GGSCI (YesB.in as ogg_user@TESTDB) 8> add trandata test1.emp

Logging of supplemental redo data enabled for table TEST1.EMP.
TRANDATA for scheduling columns has been added on table 'TEST1.EMP'.
TRANDATA for instantiation CSN has been added on table 'TEST1.EMP'.
GGSCI (YesB.in as ogg_user@TESTDB) 9> info trandata test1.emp

Logging of supplemental redo log data is enabled for table TEST1.EMP.

Columns supplementally logged for table TEST1.EMP: EMPNO.

Prepared CSN for table TEST1.EMP: 1657066
GGSCI (YesB.in as ogg_user@TESTDB) 10>


GGSCI (YesB.in as ogg_user@TESTDB) 11> add extract ext1,tranlog,begin now
EXTRACT added.


GGSCI (YesB.in as ogg_user@TESTDB) 12> add exttrail /u01/app/oracle/product/11.2.0/ogg_1/dirdat/lt,extract ext1
EXTTRAIL added.

GGSCI (YesB.in as ogg_user@TESTDB) 13>

GGSCI (YesB.in as ogg_user@TESTDB) 14> add extract dpdump,exttrailsource /u01/app/oracle/product/11.2.0/ogg_1/dirdat/lt
EXTRACT added.



GGSCI (YesB.in as ogg_user@TESTDB) 3> add rmttrail /u01/app/oracle/product/11.2.0/ogg_1/dirdat/rt,extract dpdump
RMTTRAIL added.

GGSCI (YesB.in as ogg_user@TESTDB) 4> start ext1
ERROR: Parameter file /u01/app/oracle/product/11.2.0/ogg_1/dirprm/ext1.prm does not exist.


GGSCI (YesB.in as ogg_user@TESTDB) 5> edit param ext1
EXTRACT EXT1
userid ogg_user, password oracle
exttrail /u01/app/oracle/product/11.2.0/ogg_1/dirdat/lt
TABLE test1.emp;

GGSCI (YesB.in as ogg_user@TESTDB) 5> edit param dpdump
EXTRACT dpdump
userid ogg_user, password oracle
RMTHOST 192.168.56.102,MGRPORT 7809
rmttrail /u01/app/oracle/product/11.2.0/ogg_1/dirdat/rt
TABLE test1.emp;


At Target Site,

add checkpointtable ogg_user.chkpttb1

add replicat rep1,exttrail /u01/app/oracle/product/11.2.0/ogg_1/dirdat/rt,checkpointtable ogg_user.chkpttb1 


start rep1

REPLICAT REP1
userid ogg_user password oracle
ASSUMETARGETDEFS
MAP TEST1.EMP, TARGET TEST2.EMP;


GGSCI (YesB.in as ogg_user@TESTDB) 43> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     DPDUMP      00:00:00      00:00:03
EXTRACT     RUNNING     EXT1        00:00:00      00:00:10
REPLICAT    RUNNING     REP1        00:00:00      00:00:06


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

GGSCI (YesB.in as ogg_user@TESTDB) 44> edit param ext1
EXTRACT EXT1
userid ogg_user, password oracle
exttrail /u01/app/oracle/product/11.2.0/ogg_1/dirdat/lt
TABLE test1.emp;

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

GGSCI (YesB.in as ogg_user@TESTDB) 46> edit param dpdump
EXTRACT dpdump
userid ogg_user, password oracle
RMTHOST 192.168.56.101,MGRPORT 7809
rmttrail /u01/app/oracle/product/11.2.0/ogg_1/dirdat/rt
TABLE test1.emp;

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

GGSCI (YesB.in as ogg_user@TESTDB) 47> edit param rep1
REPLICAT REP1
userid ogg_user password oracle
ASSUMETARGETDEFS
MAP TEST1.EMP, TARGET TEST2.EMP;

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

GGSCI (YesB.in as ogg_user@TESTDB) 48> edit param mgr
PORT 7809
*************************************************************


1EMPNO   
2ENAME   
3JOB     
4MGR     
5HIREDATE
6SAL     
7COMM    
8DEPTNO  



 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 EMPNO                                     NOT NULL NUMBER(4)
 ENAME                                              VARCHAR2(10)
 JOB                                                VARCHAR2(9)
 MGR                                                NUMBER(4)
 HIREDATE                                           DATE
 SAL                                                NUMBER(7,2)
 COMM                                               NUMBER(7,2)
 DEPTNO                                             NUMBER(2)



Insert some values at source and try to check extract status in GGSCI..

https://gettysburg.wccnet.edu/~chasselb/ora291/ClassNotes/9_dml.htm



GGSCI (YesB.in as ogg_user@TESTDB) 49> stats ext1

Sending STATS request to EXTRACT EXT1 ...

No active extraction maps.


GGSCI (YesB.in as ogg_user@TESTDB) 50>  stats ext1

Sending STATS request to EXTRACT EXT1 ...

No active extraction maps.


GGSCI (YesB.in as ogg_user@TESTDB) 51>  stats ext1

Sending STATS request to EXTRACT EXT1 ...

Start of Statistics at 2017-01-07 18:35:30.

Output to /u01/app/oracle/product/11.2.0/ogg_1/dirdat/lt:

Extracting from TEST1.EMP to TEST1.EMP:

*** Total statistics since 2017-01-07 18:35:29 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

*** Daily statistics since 2017-01-07 18:35:29 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

*** Hourly statistics since 2017-01-07 18:35:29 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

*** Latest statistics since 2017-01-07 18:35:29 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

End of Statistics.


GGSCI (YesB.in as ogg_user@TESTDB) 53>


Comments

Popular posts from this blog

Reboot Exadata Machine

ORA-01565: error in identifying file '?/dbs/spfile@.ora'

STEPS TO troubleshoot long running concurrent request in R12.2.x