0 Replies Latest reply: Jul 7, 2014 2:26 AM by T.T RSS

    for help :Using GoldenGate from Orace us7ascii  conversion to MySQL gbk error

    T.T

      source:

         oracle 10g

         windows server 2008 r2

         charset : us7ascii

         goldenggate :11.2.1.0

      target

        mysql 5.1

        centos 6.5

        charset GBK

      error :

         2014-07-07 13:56:31  ERROR   OGG-03008  Source column ENAME contains an invalid character and cannot be mapped to target column ENAME for conversion from source character set US-ASCII to target character set windows-936.

      The configuration process:

      1.defgen

      defsfile ./dirdef/scgbk.def CHARSET gbk

      userid ogg@orcl,password ******

      table scott.emp;

      table scott.dept;

       

      2.extract

      SETENV (NLS_LANG=AMERICAN_AMERICA.US7ASCII)

      Sourceistable

      userid ogg@orcl ,password ***********

      RMTHOST 172.168.1.188 MGRPORT 7809

      RMTFILE ./dirdat/es

      table scott.emp;

      table scott.dept;

      3.replicat

      SETENV(NLS_LANG=AMERICAN_AMERICA.GBK)

      SPECIALRUN

      Dboptions host 127.0.0.1 ,Connectionport 3306

      sourcedb scott,userid ogg ,password ********

      extfile ./dirdat/es

      SOURCEDEFS ./dirdef/scgbk.def

      MAP scott.emp ,TARGET scott.EMP;

      MAP scott.dept ,TARGET scott.DEPT;

      4. replicat reoprt file

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

                       Oracle GoldenGate Delivery for MySQL

            Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230

      Linux, x64, 64bit (optimized), MySQL Enterprise on Apr 23 2012 05:41:59

      Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.

                          Starting at 2014-07-07 12:44:25

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

      Operating System Version:

      Linux

      Version #1 SMP Fri Nov 22 03:15:09 UTC 2013, Release 2.6.32-431.el6.x86_64

      Node: aca801bc.ipt.aol.com

      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: 1971

      Description:

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

      **            Running with the following parameters                  **

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

      2014-07-07 12:44:25  INFO    OGG-03035  Operating system character set identified as UTF-8. Locale: zh_CN, LC_ALL:.

      SETENV (NLS_LANG = AMERICAN_AMERICA.GBK)

      Set environment variable (NLS_LANG=AMERICAN_AMERICA.GBK)

      SPECIALRUN

      Dboptions host 127.0.0.1 ,Connectionport 3306

      sourcedb scott,userid ogg ,password **********

      extfile ./dirdat/es

      SOURCEDEFS ./dirdef/scgbk.def

      MAP scott.emp ,TARGET scott.EMP;

      MAP scott.dept ,TARGET scott.DEPT;

      2014-07-07 12:44:25  INFO    OGG-01815  Virtual Memory Facilities for: COM

          anon alloc: mmap(MAP_ANON)  anon free: munmap

          file alloc: mmap(MAP_SHARED)  file free: munmap

          target directories:

          /home/ogg/ggs/dirtmp.

      CACHEMGR virtual memory values (may have been adjusted)

      CACHESIZE:                                2G

      CACHEPAGEOUTSIZE (normal):                8M

      PROCESS VM AVAIL FROM OS (min):           4G

      CACHESIZEMAX (strict force to disk):   3.41G

      Database Version:

      MySQL

      Server Version: 5.1.73

      Client Version: 6.0.0

      Host Connection: Localhost via UNIX socket

      Protocol Version: 10

      Opened trail file ./dirdat/es at 2014-07-07 12:44:25

      2014-07-07 12:44:26  INFO    OGG-01014  Positioning with begin time: 1970-1-1 上午12:00:00, starting record time: 2014-7-7 下午12:36:22 at extrba 964.

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

      **                     Run Time Messages                             **

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

      Opened trail file ./dirdat/es at 2014-07-07 12:44:26

      MAP resolved (entry scott.emp):

        MAP "SCOTT"."EMP" ,TARGET scott.EMP;

      Using following columns in default map by name:

        EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO

      Using the following key columns for target table scott.EMP: EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO.

      Source Context :

        SourceModule            : [ggapp.crit]

        SourceID                : [/scratch/aime1/adestore/views/aime1_adc4150256/oggcore/OpenSys/src/gglib/ggapp/crit.c]

        SourceFunction          : [CRIT_convert_error_handler  SourceLine              : [4828]

        ThreadBacktrace         : [14] elements

                                : [/home/ogg/ggs/libgglog.so(CMessageContext::AddThreadContext()+0x26) [0x7f345d9c7bc6]]

                                : [/home/ogg/ggs/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x366) [0x7f345d9c18b6]]

                                : [/home/ogg/ggs/libgglog.so(_MSG_ERR_COLUMN_CHARSET_CONVERSION_TOUTF16(CSourceContext*, char const*, char const*, char const*, char const*, CMessageFactory::MessageDisposition)+0xb4) [0x7f345d9afdf4]]

                                : [./replicat(CRIT_convert_error_handler(ULibCharSet, ULibCharSet, bool, ULibError, char*, col_def const*, col_def const*)+0x554) [0x598f54]]

                                : [./replicat(CRIT_convert_charset_col(ULibCharSet, ULibCharSet, col_def const*, col_def const*, char const*, unsigned short, char*, unsigned short, unsigned short&)+0xbe) [0x599aae]]

                                : [./replicat(CRIT_convert_character_set(ULibCharSet, ULibCharSet, char const*, char*, col_def const*, col_def*, unsigned short&)+0xa2) [0x599dc2]]

                                : [./replicat(CRIT_convert_charset_char(file_def*, file_def*, map_col_def*, short, ULibCharSet, char*, char*, char*, col_def*)+0xe4) [0x599f54]]

                                : [./replicat(map_columns_int(char*, char*, int, int*, map_col_def*, unsigned char*, file_def*, file_def*, __std_rec_hdr*, short, short*, short*, short, short, extr_ptr_def*, short)+0xb7c) [0x59dcac]]

                                : [./replicat(map_columns(char*, char*, int, int*, map_col_def*, unsigned char*, file_def*, file_def*, __std_rec_hdr*, short, short*, short*, short, short, short*, int, extr_ptr_def*)+0xfc) [0x59e39c]]

                                : [./replicat(replicate_io(file_def*, __std_rec_hdr*, char*, extr_ptr_def*, int*, int)+0x3a9) [0x565559]]

                                : [./replicat(process_extract_loop()+0x49b8) [0x562fc8]]

                                : [./replicat(main+0xbc4) [0x57ed64]]

                                : [/lib64/libc.so.6(__libc_start_main+0xfd) [0x7f345ac82d1d]]

                                : [./replicat(__gxx_personality_v0+0x282) [0x4b678a]]

      2014-07-07 12:44:26  ERROR   OGG-03008  Source column ENAME contains an invalid character and cannot be mapped to target column ENAME for conversion from source character set US-ASCII to target character set windows-936.

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

      *                   ** Run Time Statistics **                         *

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

      Reading ./dirdat/es, current RBA 964, 0 records

      Report at 2014-07-07 12:44:26 (activity since 2014-07-07 12:44:26)

      No records were replicated.

      Last log location read:

           FILE:      ./dirdat/es

           RBA:       964

           TIMESTAMP: 2014-07-07 12:36:22.200060

           EOF:       NO

           READERR:   0

      2014-07-07 12:44:26  ERROR   OGG-01668  PROCESS ABENDING.

      CACHE OBJECT MANAGER statistics

      CACHE MANAGER VM USAGE

      vm current     =      0    vm anon queues =      0

      vm anon in use =      0    vm file        =      0

      vm used max    =      0    ==> CACHE BALANCED

      CACHE CONFIGURATION

      cache size       =   2G   cache force paging = 3.41G

      buffer min       =  64K   buffer highwater   =   8M

      pageout eligible size =   8M

      ......

      ......