- Download and then create Subdirs. and configure Mgr on both ends, set port 7809
- Create Golden Gate User Ogguser and grant it the SA and replication
[[email protected] ~]# su-Sybase[[email protected] ~]$ VI. bash_profile--Set Sybasepaths and Dsquery=ase1 .[[email protected] ~]$ isql-Usa-P111111-SASE11>sp_addlogin Ogguser,ogguser2> GoPassword correctlySet. Account unlocked. New Login created. (returnStatus= 0)1>sp_adduser Ogguser2> GoNewUseradded. (returnStatus= 0)1>Sp_role'Grant', Replication_role, Ogguser2> GoAuthorizationupdated. (returnStatus= 0)1>Sp_role'Grant', Sa_role,ogguser2> GoAuthorizationupdated. (returnStatus= 0)1> Exit
- To set a second breakpoint, you must have SA permission
[[email protected] GGs]$ isql-Uogguser-Pogguser-SASE11> UseEDR2> Go1> DBCCSettrunc ('LTM','valid')2> Goltm_truncpage ltm_trunc_state db_rep_stat gen_id dbid dbname Lti_version------------- --------------- ----------- ----------- ------ ------------------------------------------------------------ ----------- 205079 1 1 0 6EDR0
- Add a log to the table you want to record
Ggsci (Localhost.localdomain)1>Dblogin Sourcedb EDR@ASE1userid ogguser Password Ogguser --Geneva- A -: $: -INFO OGG-04508Oracle GoldenGate isSearching the Sybase CS library version that is tobe used. Please ignore anyError that isReported bySybase asA part ofThis search process. --Geneva- A -: $: -INFO OGG-04509Oracle GoldenGate isUsing the Sybase CS library version:[15,701]. --Geneva- A -: $: -INFO OGG-04501Charset information:client Charset:[UTF8],Database/Server CharSet:[Iso_1], Charsetconvert:[ on]. Successfully logged into Database. Ggsci (Localhost.localdomain)2>ListTableDbo.entitydbo.entityFound1tables matching list criteria. Ggsci (Localhost.localdomain)3> AddTrandata dbo.*
- Build Definition file
ggsci (localhost.localdomain) 1 > edit param Defgendefsfile. / dirout/ Source.defsourcedb EDR @ASE1 userid Ogguser password ogguser table dbo.entity_ Address; table dbo.entity; Ggsci (localhost.localdomain) 1 > shell. / Defgen paramfile dirprm/ DEFGEN.PRM
definitions generated for tables in./dirout/source.def.
- Edit Initial extraction parameters: Edit param eedr0
extract eedr0sourcedb edr @ASE1 userid ogguser password ogguserrmthost 192.168 . 137.11 , Mgrport 7809 rmttask Replicat, group Pedr0 table dbo.entity_address; table dbo.entity; ...
Ggsci (localhost.localdomain) 4> edit param eedr0
Ggsci (Localhost.localdomain) 5> Add extract eedr0, sourceistable
- Edit target side: Edit param pedr0 and join Pedr0:add Replicat pedr0, specialrun note replicat do not need to start manually, just start extract in source.
eplicat Pedr0userid goldengate, PASSWORD goldengatesourcedefs./Dirdef/Source.defhandlecollisionsdiscardfile./Dirrpt/PEDR0.DSC, append, megabytesTenMAP dbo.entity_address,target SWAT. Entity_address,colmap (Usedefaults,state_code=State_code, City=City , STREET1=Street1, STREET2=Street2, ZIP=zip, is_bad_address=bad_address);
- Start Extract:start extract eedr0 in source and view it info eedr0
--Here are some examples of error conditions:--1 --Geneva- - ,: -:TenWARNING OGG-01194EXTRACT Task PT0 Abended:badcolumnLength (8) specified for columnDinch TableDBO.T, maximum allowable length is 3.--This is the source and target side of the column type is not the same, one is a character, one is a numeric value, using the equation @numstr to convert, still error. --2 --Geneva- - ,: -: AboutWARNING OGG-01194EXTRACT Task PEDR0 Abended:there isNo trail toReposition to whenDoing directLoadtask. --this is usually caused by a number of errors, two cases, one is a class of numerical type is not the same, no use of the equation to convert the report is wrong, with the handlecollisions, after the transformation of the equation, to report another error. Another case is a primary key violation, with the same primary key value, handlecollisions. --3--when only some of the columns participate in the mapping, the source and destination must have a primary key, and if all columns are added, the primary key will be much more efficient, and if there is no primary key, the goldengate will make the array a primary key, which is expensive. --4--the columns of the primary key must participate in the mapping.