本文主要是介绍GoldenGate configuration CLOB type synchronization,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
在GoldenGate的DML同步中,如果字段类型包含CLOB,必须在源端的extract参数文件中添加以下参数TRANLOGOPTIONS CONVERTUCS2CLOBS
GGSCI (gg01) 19> VIEW params eorajjEXTRACT EORAJJ
USERID system, PASSWORD oracle
RMTHOST gg02, MGRPORT 7809
RMTTRAIL /u01/app/oracle/goldengate/dirdat/jjDDL INCLUDE ALL
DDLOPTIONS ADDTRANDATA,REPORTTRANLOGOPTIONS CONVERTUCS2CLOBSTABLE scott.*;
SEQUENCE scott.*;
源端操作
SCOTT@gg01:~>create table t_clob(tid integer primary key,c_clob clob);Table created.SCOTT@gg01:~>insert into t_clob values(1,'TEST');1 row created.SCOTT@gg01:~>commit;Commit complete.SCOTT@gg01:~>set linesize 200
SCOTT@gg01:~>select * from t_clob;TID C_CLOB
---------- --------------------------------------------------------------------------------1 TEST
目标端
SCOTT@gg02:~>SELECT tname FROM tab;TNAME
------------------------------
DEPT
EMP
BONUS
SALGRADE
T_ZWC
T_CLOB6 ROWS selected.SCOTT@gg02:~>SELECT * FROM t_clob;TID C_CLOB
---------- --------------------------------------------------------------------------------1 TEST
[oracle@gg02 goldengate]$ logdump Oracle GoldenGate Log File Dump Utility
Version 10.4.0.19 Build 002Copyright (C) 1995, 2009, Oracle AND/OR its affiliates. ALL rights reserved.Logdump 23 >OPEN /u01/app/oracle/goldengate/dirdat/jj000003
CURRENT LogTrail IS /u01/app/oracle/goldengate/dirdat/jj000003
Logdump 24 >ghdr ON
Logdump 25 >headertoken ON
Logdump 26 >usertoken ON
Logdump 27 >detail ON
Logdump 28 >detail DATA
Logdump 29 >n
TokenID x46 'F' Record Header Info xff80 LENGTH 927
TokenID x30 '0' TrailInfo Info x00 LENGTH 442
TokenID x31 '1' MachineInfo Info x00 LENGTH 85
TokenID x32 '2' DatabaseInfo Info x00 LENGTH 283
TokenID x33 '3' ProducerInfo Info x00 LENGTH 81
TokenID x34 '4' ContinunityInfo Info x00 LENGTH 8
TokenID x5a 'Z' Record Trailer Info xff80 LENGTH 927 2012/01/15 16:58:18.278.866 FileHeader Len 919 RBA 0
Name: *FileHeader* 3000 01ba 3000 0008 4747 0d0a 544c 0a0d 3100 0002 | 0...0...GG..TL..1... 0002 3200 0004 ffff fffd 3300 0008 02f1 dcc0 c151 | ..2.......3........Q 2fd2 3400 0025 0023 7572 693a 6767 3031 3a3a 7530 | /.4..%.#uri:gg01::u0 313a 6170 703a 6f72 6163 6c65 3a67 6f6c 6465 6e67 | 1:app:oracle:goldeng 6174 6536 0000 2c00 2a2f 7530 312f 6170 702f 6f72 | ate6..,.*/u01/app/OR 6163 6c65 2f67 6f6c 6465 6e67 6174 652f 6469 7264 | acle/goldengate/dird 6174 2f6a 6a30 3030 3030 3337 0000 0101 3800 0004 | at/jj0000037....8... Logdump 30 >n
TokenID x47 'G' Record Header Info x01 LENGTH 61
TokenID x48 'H' GHDR Info x00 LENGTH 35
TokenID x54 'T' GGS Tokens Info x00 LENGTH 10
TokenID x5a 'Z' Record Trailer Info x01 LENGTH 61
___________________________________________________________________
Hdr-Ind : E (x45) Partition : . (x00)
UndoFlag : . (x00) BeforeAfter: A (x41)
RecLength : 0 (x0000) IO TIME : 2012/01/15 16:58:25.307.836
IOType : 151 (x97) OrigNode : 0 (x00)
TransInd : . (x03) FormatType : R (x52)
SyskeyLen : 0 (x00) Incomplete : . (x00)
AuditRBA : 0 AuditPos : 0
Continued : N (x00) RecCount : 0 (x00) 2012/01/15 16:58:25.307.836 RestartOK Len 0 RBA 927
Name:
After Image: Partition 0 G s Logdump 31 >n
TokenID x47 'G' Record Header Info x01 LENGTH 160
TokenID x48 'H' GHDR Info x00 LENGTH 47
TokenID x44 'D' DATA Info x00 LENGTH 47
TokenID x54 'T' GGS Tokens Info x00 LENGTH 46
TokenID x5a 'Z' Record Trailer Info x01 LENGTH 160
___________________________________________________________________
Hdr-Ind : E (x45) Partition : . (x04)
UndoFlag : . (x00) BeforeAfter: A (x41)
RecLength : 47 (x002f) IO TIME : 2012/01/15 17:00:30.032.862
IOType : 5 (x05) OrigNode : 255 (xff)
TransInd : . (x03) FormatType : R (x52)
SyskeyLen : 0 (x00) Incomplete : . (x00)
AuditRBA : 4 AuditPos : 10869684
Continued : N (x00) RecCount : 1 (x01) 2012/01/15 17:00:30.032.862 INSERT Len 47 RBA 988
Name: SCOTT.T_CLOB
After Image: Partition 4 G s 0000 0005 0000 0001 3100 0100 2200 0000 1e3c 4854 | ........1..."....TEST 3c2f 4854 4d4c 3e |
Column 0 (x0000), Len 5 (x0005) 0000 0001 31 | ....1
Column 1 (x0001), Len 34 (x0022) 0000 001e 3c48 544d 4c3e 3c42 4f44 593e 5445 5354 | ....TEST 3c2f 424f 4459 3e3c 2f48 544d 4c3e |
这篇关于GoldenGate configuration CLOB type synchronization的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!