OGG ORA-01847: day of month must be between 1 and last day of month (status = 1847)

1、某客户lis库replicat进程ABENDING;
2、查看ggserr.log日志信息,报如下错误:
     2017-10-25 11:25:35  INFO    OGG-00996  Oracle GoldenGate Delivery for Oracle, repyylis.prm:  REPLICAT REPYYLIS started.
    2017-10-25 11:25:35  WARNING OGG-00869  Oracle GoldenGate Delivery for Oracle, repyylis.prm:   OCI Error ORA-01847: day of month must be between 1 and last day of month (status = 1847). INSERT INTO "TXYY_LIS"."L_PATIENTINFO"("DOCTADVISENO","REQUESTTIME","REQUESTER","EXECUTETIME","EXECUTOR","RECEIVETIME","RECEIVER","CANCELTIME","CANCELER","STAYHOSPITALMODE","PATIENTID","INFANTFLAG","SECTION","DEPART_BED","PATIENTNAME","SEX","BIRTHDAY","NL","NLDW","CYCLE","DIAGNOSTIC","SAMPLETYPE","TOPONYMY","EXAMINAIMCODE","EXAMINAIM","REQUESTMODE","NOTES","FEE","FEESTATUS","SAMPLENO","RESULTCOMMENT","RESULTSTATUS","CHECKOPERATOR","CHECKEROPINION","CHECKTIME","LABDEPARTMENT","CISBORDER","EDITSTATUS","BRLB","BRXZ","PRINTTIME","PRINTFLAG","BMXH","FPHM","COMPUTERNAME","SFBZ","CHECKER2","SJDW","YBID","REQUESTID","CHECKUPNO","FZCS","DYCS","MFPB","AUTOPRINTED","BGSJ","TXSJ","GZJS","ADRESS","SCBZ","YEWYH","YEPB","UPLOAD","TX_JLSJ","SFZH","WSWLH") VALUES (:a0,:a1,:a2,:a3,:a4,:a5,:a6,:a7,:a8,:a9,:a10,:a11,:a12,:a13,:a14,:a15,:a16,:a17,:a18,:a19,:a20,:a21,:a22,:a23,:a24,:a25,:a26,:a27,:a28,:a29,:a30,:a31,:a32,:a33,:a34,:a35,:a36,:a37,:a38,:a39,:a40,:a41,:a42,:a43,:a44,:a45,:a46,:a47,:a48,:a49,:a50,:a51,:a52,:a53,:a54,:a55,:a56,:a57,:a58,:a59,:a60,:a61,:a62,:a63,:a64,:a65).
2017-10-25 11:25:35  WARNING OGG-01004  Oracle GoldenGate Delivery for Oracle, repyylis.prm:  Aborted grouped transaction on 'TXYY_LIS.L_PATIENTINFO', Database error 1847 (OCI Error ORA-01847: day of month must be between 1 and last day of month (status = 1847). INSERT INTO "TXYY_LIS"."L_PATIENTINFO" ("DOCTADVISENO","REQUESTTIME","REQUESTER","EXECUTETIME","EXECUTOR","RECEIVETIME","RECEIVER","CANCELTIME","CANCELER","STAYHOSPITALMODE","PATIENTID","INFANTFLAG","SECTION","DEPART_BED","PATIENTNAME","SEX","BIRTHDAY","NL","NLDW","CYCLE","DIAGNOSTIC","SAMPLETYPE","TOPONYMY","EXAMINAIMCODE","EXAMINAIM","REQUESTMODE","NOTES","FEE","FEESTATUS","SAMPLENO","RESULTCOMMENT","RESULTSTATUS","CHECKOPERATOR","CHECKEROPINION","CHECKTIME","LABDEPARTMENT","CISBORDER","EDITSTATUS","BRLB","BRXZ","PRINTTIME","PRINTFLAG","BMXH","FPHM","COMPUTERNAME","SFBZ","CHECKER2","SJDW","YBID","REQUESTID","CHECKUPNO","FZCS","DYCS","MFPB","AUTOPRINTED","BGSJ","TXSJ","GZJS","ADRESS","SCBZ","YEWYH","YEPB","UPLOAD","TX_JLSJ","SFZH","WSWLH") VALUES (:a0,:a1,:a2,:a3,:a4,:a5,:a6,:a7,:a8,:a9,:a10,:a11,:a12,:a13,:a14,:a15,:a16,:a17,:a18,:a19,:a20,:a21,:a22,:a23,:a24,:a25,:a26,:a27,:a28,:a29,:a30,:a31,:a32,:a33,:a34,:a35,:a36,:a37,:a38,:a39,:a40,:a41,:a42,:a43,:a44,:a45,:a46,:a47,:a48,:a49,:a50,:a51,:a52,:a53,:a54,:a55,:a56,:a57,:a58,:a59,:a60,:a61,:a62,:a63,:a64,:a65)).
2017-10-25 11:25:35  WARNING OGG-01003  Oracle GoldenGate Delivery for Oracle, repyylis.prm:   Repositioning to rba 54903443 in seqno 594.
2017-10-25 11:25:35  WARNING OGG-01154  Oracle GoldenGate Delivery for Oracle, repyylis.prm:   SQL error 1847 mapping LIS.L_PATIENTINFO to TXYY_LIS.L_PATIENTINFO OCI Error ORA-01847: day of month must be between 1 and last day of month (status = 1847). INSERT INTO "TXYY_LIS"."L_PATIENTINFO"("DOCTADVISENO","REQUESTTIME","REQUESTER","EXECUTETIME","EXECUTOR","RECEIVETIME","RECEIVER","CANCELTIME","CANCELER","STAYHOSPITALMODE","PATIENTID","INFANTFLAG","SECTION","DEPART_BED","PATIENTNAME","SEX","BIRTHDAY","NL","NLDW","CYCLE","DIAGNOSTIC","SAMPLETYPE","TOPONYMY","EXAMINAIMCODE","EXAMINAIM","REQUESTMODE","NOTES","FEE","FEESTATUS","SAMPLENO","RESULTCOMMENT","RESULTSTATUS","CHECKOPERATOR","CHECKEROPINION","CHECKTIME","LABDEPARTMENT","CISBORDER","EDITSTATUS","BRLB","BRXZ","PRINTTIME","PRINTFLAG","BMXH","FPHM","COMPUTERNAME","SFBZ","CHECKER2","SJDW","YBID","REQUESTID","CHECKUPNO","FZCS","DYCS","MFPB","AUTOPRINTED","BGSJ","TXSJ","GZJS","ADRESS","SCBZ","YEWYH","YEPB","UPLOAD","TX_JLSJ","SFZH","WSWLH") VALUES (:a0,:a1,:a2,:a3,:a4,:a5,:a6,:a7,:a8,:a9,:a10,:a11,:a12,:a13,:a14,:a15,:a16,:a17,:a18,:a19,:a20,:a21,:a22,:a23,:a24,:a25,:a26,:a27,:a28,:a29,:a30,:a31,:a32,:a33,:a34,:a35,:a36,:a37,:a38,:a39,:a40,:a41,:a42,:a43,:a44,:a45,:a46,:a47,:a48,:a49,:a50,:a51,:a52,:a53,:a54,:a55,:a56,:a57,:a58,:a59,:a60,:a61,:a62,:a63,:a64,:a65).
2017-10-25 11:25:35  WARNING OGG-01003  Oracle GoldenGate Delivery for Oracle, repyylis.prm:  Repositioning to rba 54903443 in seqno 594.
2017-10-25 11:25:35  ERROR   OGG-01296  Oracle GoldenGate Delivery for Oracle, repyylis.prm:  Error mapping from LIS.L_PATIENTINFO to TXYY_LIS.L_PATIENTINFO.
2017-10-25 11:25:35  ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle, repyylis.prm:  PROCESS ABENDING.


从上述报错,可以判断是涉及表L_PATIENTINFO插入数据时涉及该表时间列时由于插入的数据不符合date类型要求而报错该处未明确报涉及的列。

  查看下该错误:
[oracle@txws  dirdat]$ oerr  ora 1847
01847, 00000, "day of month must be between 1 and last day of month"
// *Cause:
// *Action:


3、获取源端和目标端对应表的DDL,如下:
    源端:
 CREATE TABLE "LIS"."L_PATIENTINFO"
  (    "DOCTADVISENO" VARCHAR2(100) DEFAULT '0' NOT NULL ENABLE,
       "REQUESTTIME" DATE,
       "REQUESTER" VARCHAR2(20),
       "EXECUTETIME" DATE DEFAULT sysdate,
       "EXECUTOR" VARCHAR2(20),
       "RECEIVETIME" DATE DEFAULT sysdate,
       "RECEIVER" VARCHAR2(20),
       "CANCELTIME" DATE,
       "CANCELER" VARCHAR2(20),
       "STAYHOSPITALMODE" NUMBER(1,0) NOT NULL ENABLE,
       "PATIENTID" VARCHAR2(25),
       "INFANTFLAG" NUMBER(1,0) DEFAULT 0 NOT NULL ENABLE,
       "SECTION" VARCHAR2(10),
       "DEPART_BED" VARCHAR2(8),
       "PATIENTNAME" VARCHAR2(20) NOT NULL ENABLE,
       "SEX" CHAR(1) DEFAULT '0',
       "BIRTHDAY" DATE,
       "NL" VARCHAR2(3),
       "NLDW" VARCHAR2(1),
       "CYCLE" VARCHAR2(2) DEFAULT '10' NOT NULL ENABLE,
       "DIAGNOSTIC" VARCHAR2(40),
       "SAMPLETYPE" VARCHAR2(2) DEFAULT '1' NOT NULL ENABLE,
       "TOPONYMY" VARCHAR2(20),
       "EXAMINAIMCODE" VARCHAR2(400),
       "EXAMINAIM" VARCHAR2(400),
       "REQUESTMODE" NUMBER(1,0) DEFAULT 0 NOT NULL ENABLE,
       "NOTES" VARCHAR2(100),
       "FEE" NUMBER(7,2) DEFAULT 0 NOT NULL ENABLE,
       "FEESTATUS" NUMBER(1,0) DEFAULT 1 NOT NULL ENABLE,
       "SAMPLENO" VARCHAR2(16) DEFAULT '0' NOT NULL ENABLE,
       "RESULTCOMMENT" VARCHAR2(160),
       "RESULTSTATUS" NUMBER(1,0) DEFAULT 0,
       "CHECKOPERATOR" VARCHAR2(20),
       "CHECKEROPINION" VARCHAR2(200),
       "CHECKTIME" DATE,
       "LABDEPARTMENT" VARCHAR2(10),
       "CISBORDER" NUMBER(1,0) DEFAULT 1 NOT NULL ENABLE,
       "EDITSTATUS" NUMBER(2,0) DEFAULT 0 NOT NULL ENABLE,
       "BRLB" VARCHAR2(4) DEFAULT 0,
       "BRXZ" VARCHAR2(10) DEFAULT 0,
       "PRINTTIME" DATE,
       "PRINTFLAG" NUMBER(1,0) DEFAULT 0,
       "BMXH" NUMBER(2,0),
       "FPHM" VARCHAR2(12),
       "COMPUTERNAME" VARCHAR2(20),
       "SFBZ" NUMBER(1,0) DEFAULT 0,
       "CHECKER2" VARCHAR2(10),
       "SJDW" VARCHAR2(30),
       "YBID" VARCHAR2(12),
       "REQUESTID" VARCHAR2(15),
       "CHECKUPNO" NUMBER(6,0),
       "FZCS" NUMBER(6,0),
       "DYCS" NUMBER(2,0) DEFAULT 0,
       "MFPB" NUMBER(1,0),
       "AUTOPRINTED" NUMBER(1,0) DEFAULT 0,
       "BGSJ" DATE,
       "TXSJ" DATE,
       "GZJS" NUMBER(3,0),
       "ADRESS" VARCHAR2(200),
       "SCBZ" NUMBER(10,0),
       "YEWYH" NUMBER(18,0),
       "YEPB" NUMBER(1,0),
       "UPLOAD" NUMBER(1,0) DEFAULT 0,
       "TX_JLSJ" DATE DEFAULT null,
       "SFZH" VARCHAR2(30),
       "WSWLH" VARCHAR2(2),
        CONSTRAINT "PK_PATIENTINFO" PRIMARY KEY ("SAMPLENO", "DOCTADVISENO")
 USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
 TABLESPACE "TS_JYK"  ENABLE,
        SUPPLEMENTAL LOG GROUP "GGS_93275" ("DOCTADVISENO", "SAMPLENO") ALWAYS
  ) PCTFREE 30 PCTUSED 70 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
 TABLESPACE "LIS"

目标端:
     CREATE TABLE "TXYY_LIS"."L_PATIENTINFO"
   (    "DOCTADVISENO" VARCHAR2(100) DEFAULT '0' NOT NULL ENABLE,
        "REQUESTTIME" DATE,
        "REQUESTER" VARCHAR2(20),
        "EXECUTETIME" DATE DEFAULT sysdate,
        "EXECUTOR" VARCHAR2(20),
        "RECEIVETIME" DATE DEFAULT sysdate,
        "RECEIVER" VARCHAR2(20),
        "CANCELTIME" DATE,
        "CANCELER" VARCHAR2(20),
        "STAYHOSPITALMODE" NUMBER(1,0) NOT NULL ENABLE,
        "PATIENTID" VARCHAR2(25),
        "INFANTFLAG" NUMBER(1,0) DEFAULT 0 NOT NULL ENABLE,
        "SECTION" VARCHAR2(10),
        "DEPART_BED" VARCHAR2(8),
        "PATIENTNAME" VARCHAR2(20) NOT NULL ENABLE,
        "SEX" CHAR(1) DEFAULT '0',
        "BIRTHDAY" DATE,
        "NL" VARCHAR2(3),
        "NLDW" VARCHAR2(1),
        "CYCLE" VARCHAR2(2) DEFAULT '10' NOT NULL ENABLE,
        "DIAGNOSTIC" VARCHAR2(40),
        "SAMPLETYPE" VARCHAR2(2) DEFAULT '1' NOT NULL ENABLE,
        "TOPONYMY" VARCHAR2(20),
        "EXAMINAIMCODE" VARCHAR2(400),
        "EXAMINAIM" VARCHAR2(400),
        "REQUESTMODE" NUMBER(1,0) DEFAULT 0 NOT NULL ENABLE,
        "NOTES" VARCHAR2(100),
        "FEE" NUMBER(7,2) DEFAULT 0 NOT NULL ENABLE,
        "FEESTATUS" NUMBER(1,0) DEFAULT 1 NOT NULL ENABLE,
        "SAMPLENO" VARCHAR2(16) DEFAULT '0' NOT NULL ENABLE,
        "RESULTCOMMENT" VARCHAR2(160),
        "RESULTSTATUS" NUMBER(1,0) DEFAULT 0,
        "CHECKOPERATOR" VARCHAR2(20),
        "CHECKEROPINION" VARCHAR2(200),
        "CHECKTIME" DATE,
        "LABDEPARTMENT" VARCHAR2(10),
        "CISBORDER" NUMBER(1,0) DEFAULT 1 NOT NULL ENABLE,
        "EDITSTATUS" NUMBER(2,0) DEFAULT 0 NOT NULL ENABLE,
        "BRLB" VARCHAR2(4) DEFAULT 0,
        "BRXZ" VARCHAR2(10) DEFAULT 0,
        "PRINTTIME" DATE,
        "PRINTFLAG" NUMBER(1,0) DEFAULT 0,
        "BMXH" NUMBER(2,0),
        "FPHM" VARCHAR2(12),
        "COMPUTERNAME" VARCHAR2(20),
        "SFBZ" NUMBER(1,0) DEFAULT 0,
        "CHECKER2" VARCHAR2(10),
        "SJDW" VARCHAR2(30),
        "YBID" VARCHAR2(12),
        "REQUESTID" VARCHAR2(15),
        "CHECKUPNO" NUMBER(6,0),
        "FZCS" NUMBER(6,0),
        "DYCS" NUMBER(2,0) DEFAULT 0,
        "MFPB" NUMBER(1,0),
        "AUTOPRINTED" NUMBER(1,0) DEFAULT 0,
        "BGSJ" DATE,
        "TXSJ" DATE,
        "GZJS" NUMBER(3,0),
        "ADRESS" VARCHAR2(200),
        "SCBZ" NUMBER(10,0),
        "YEWYH" NUMBER(18,0),
        "YEPB" NUMBER(1,0),
        "UPLOAD" NUMBER(1,0) DEFAULT 0,
        "TX_JLSJ" DATE DEFAULT null,
        "SFZH" VARCHAR2(30),
        "WSWLH" VARCHAR2(2),
         CONSTRAINT "PK_PATIENTINFO" PRIMARY KEY ("SAMPLENO", "DOCTADVISENO")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  TABLESPACE "TXYY_LIS"  ENABLE,
         SUPPLEMENTAL LOG GROUP "GGS_93275" ("DOCTADVISENO", "SAMPLENO") ALWAYS
   ) SEGMENT CREATION IMMEDIATE
  PCTFREE 30 PCTUSED 70 INITRANS 1 MAXTRANS 255
 NOCOMPRESS LOGGING
  TABLESPACE "TXYY_LIS"

    从源端和目标端对象的DDL可以看出,两边表结构完全一致,由此可判断是由于源端的数据源导致该问题,由于该对象涉及date时间类型的列较多,暂时无法判断是那列的数据引起。
    从discard file及report file中也可以看到相同的错误,此处暂不列出具体信息;

4、使用logdump工具分析队列文件,看具体列对应的信息:

Logdump 795> usertoken on   #查看用户定义的信息
Logdump 796> detail data      #查看hex和ASCII数据值  
Logdump 797> detail on      #查看列信息,包括数量和长度
Logdump 798>  FILTER FILENAME   LIS.L_PATIENTINFO      #设置过滤对象,只查找报错对象的信息
Logdump 799>  open ./dirdat/yl000594        #打开需要查看的队列文件
Logdump 800 > POS 54903443                   #指定一个RBA查看(我们直接跳到报错信息中报的RBA点)
Reading forward from RBA 54903443 
Logdump 801 >
Logdump 801 > n     #查看下一条记录  (next)

2017/10/20 20:02:10.039.957 Insert               Len   934 RBA 54903443 
Name: LIS.L_PATIENTINFO 
After  Image:                                             Partition 4   G  b   
 0000 0012 0000 000e 3230 3137 3132 3937 3032 3730 | ........201712970270  
 312d 0001 0015 ffff 3139 3030 2d30 312d 3031 3a30 | 1-......1900-01-01:0  
 303a 3030 3a30 3000 0200 0700 0000 0337 3635 0003 | 0:00:00........765..  
 0015 0000 3230 3137 2d31 302d 3230 3a31 393a 3435 | ....2017-10-20:19:45  
 3a30 3000 0400 0700 0000 0335 3932 0005 0015 0000 | :00........592......  
 3230 3137 2d31 302d 3230 3a32 303a 3032 3a31 3600 | 2017-10-20:20:02:16.  
 0600 0700 0000 0343 3035 0007 0015 ffff 3139 3030 | .......C05......1900  
Column     0 (x0000), Len    18 (x0012)  
 0000 000e 3230 3137 3132 3937 3032 3730 312d      | ....2017129702701-  
Column     1 (x0001), Len    21 (x0015)  
 ffff 3139 3030 2d30 312d 3031 3a30 303a 3030 3a30 | ..1900-01-01:00:00:0  
 30                                                | 0  
Column     2 (x0002), Len     7 (x0007)  
 0000 0003 3736 35                                 | ....765  
Column     3 (x0003), Len    21 (x0015)  
 0000 3230 3137 2d31 302d 3230 3a31 393a 3435 3a30 | ..2017-10-20:19:45:0  
 30                                                | 0  
Column     4 (x0004), Len     7 (x0007)  
 0000 0003 3539 32                                 | ....592  
Column     5 (x0005), Len    21 (x0015)  
 0000 3230 3137 2d31 302d 3230 3a32 303a 3032 3a31 | ..2017-10-20:20:02:1  
 36                                                | 6  
Column     6 (x0006), Len     7 (x0007)  
 0000 0003 4330 35                                 | ....C05  
Column     7 (x0007), Len    21 (x0015)  
 ffff 3139 3030 2d30 312d 3031 3a30 303a 3030 3a30 | ..1900-01-01:00:00:0  
 30                                                | 0  
Column     8 (x0008), Len     4 (x0004)  
 ffff 0000                                         | ....  
Column     9 (x0009), Len    10 (x000a)  
 0000 0000 0000 0000 0002                          | ..........  
Column    10 (x000a), Len    12 (x000c)  
 0000 0008 3030 3432 3938 3632                     | ....00429862  
Column    11 (x000b), Len    10 (x000a)  
 0000 0000 0000 0000 0000                          | ..........  
Column    12 (x000c), Len     6 (x0006)  
 0000 0002 3232                                    | ....22  
Column    13 (x000d), Len     9 (x0009)  
 0000 0005 4331 2d32 39                            | ....C1-29  
Column    14 (x000e), Len    10 (x000a)  
 0000 0006 d5c5 d1a7 c3f4                          | ..........  
Column    15 (x000f), Len     3 (x0003)  
 0000 32                                           | ..2  
Column    16 (x0010), Len    21 (x0015)  
 0000 3139 3031 2d30 312d 3030 3a31 323a 3434 3a32 | ..1901-01-00:12:44:2  
 34                                                | 4  
Column    17 (x0011), Len     7 (x0007)  
 0000 0003 3131 36                                 | ....116  
Column    18 (x0012), Len     5 (x0005)  
 0000 0001 31                                      | ....1  
Column    19 (x0013), Len     6 (x0006)  
 0000 0002 3230                                    | ....20  
Column    20 (x0014), Len    16 (x0010)  
 0000 000c c8d1 c9ef cfe0 b9d8 c7e9 bff6           | ................  
Column    21 (x0015), Len     5 (x0005)  
 0000 0001 43                                      | ....C  
Column    22 (x0016), Len     4 (x0004)  
 ffff 0000                                         | ....  
Column    23 (x0017), Len     9 (x0009)  
 0000 0005 3939 3739 5e                            | ....9979^  
Column    24 (x0018), Len    12 (x000c)  
 0000 0008 d1aa c4fd b7d6 cef6                     | ............  
Column    25 (x0019), Len    10 (x000a)  
 0000 0000 0000 0000 0000                          | ..........  
Column    26 (x001a), Len     8 (x0008)  
 0000 0004 d5fd b3a3                               | ........  
Column    27 (x001b), Len    10 (x000a)  
 0000 0000 0000 0000 2648                          | ........&H  
Column    28 (x001c), Len    10 (x000a)  
 0000 0000 0000 0000 0002                          | ..........  
Column    29 (x001d), Len    19 (x0013)  
 0000 000f 3230 3137 3130 3230 4341 5330 3039 34   | ....20171020CAS0094  
Column    30 (x001e), Len     4 (x0004)  
 ffff 0000                                         | ....  
Column    31 (x001f), Len    10 (x000a)  
 0000 0000 0000 0000 0000                          | ..........  
Column    32 (x0020), Len     4 (x0004)  
 ffff 0000                                         | ....  
Column    33 (x0021), Len     4 (x0004)  
 ffff 0000                                         | ....  
Column    34 (x0022), Len    21 (x0015)  
 ffff 3139 3030 2d30 312d 3031 3a30 303a 3030 3a30 | ..1900-01-01:00:00:0  
 30                                                | 0  
Column    35 (x0023), Len     8 (x0008)  
 0000 0004 3330 3833                               | ....3083  
Column    36 (x0024), Len    10 (x000a)  
 0000 0000 0000 0000 0001                          | ..........  
Column    37 (x0025), Len    10 (x000a)  
 0000 0000 0000 0000 0001                          | ..........  
Column    38 (x0026), Len     5 (x0005)  
 0000 0001 30                                      | ....0  
Column    39 (x0027), Len     5 (x0005)  
 0000 0001 31                                      | ....1  
Column    40 (x0028), Len    21 (x0015)  
 ffff 3139 3030 2d30 312d 3031 3a30 303a 3030 3a30 | ..1900-01-01:00:00:0  
 30                                                | 0  
Column    41 (x0029), Len    10 (x000a)  
 0000 0000 0000 0000 0000                          | ..........  
Column    42 (x002a), Len    10 (x000a)  
 ffff 0000 0000 0000 0000                          | ..........  
Column    43 (x002b), Len     4 (x0004)  
 ffff 0000                                         | ....  
Column    44 (x002c), Len    14 (x000e)  
 0000 000a 2020 2020 2020 2020 2020                | ....            
Column    45 (x002d), Len    10 (x000a)  
 0000 0000 0000 0000 0000                          | ..........  
Column    46 (x002e), Len     4 (x0004)  
 ffff 0000                                         | ....  
Column    47 (x002f), Len     4 (x0004)  
 ffff 0000                                         | ....  
Column    48 (x0030), Len     4 (x0004)  
 ffff 0000                                         | ....  
Column    49 (x0031), Len     4 (x0004)  
 ffff 0000                                         | ....  
Column    50 (x0032), Len    10 (x000a)  
 ffff 0000 0000 0000 0000                          | ..........  
Column    51 (x0033), Len    10 (x000a)  
 ffff 0000 0000 0000 0000                          | ..........  
Column    52 (x0034), Len    10 (x000a)  
 0000 0000 0000 0000 0000                          | ..........  
Column    53 (x0035), Len    10 (x000a)  
 ffff 0000 0000 0000 0000                          | ..........  
Column    54 (x0036), Len    10 (x000a)  
 0000 0000 0000 0000 0000                          | ..........  
Column    55 (x0037), Len    21 (x0015)  
 ffff 3139 3030 2d30 312d 3031 3a30 303a 3030 3a30 | ..1900-01-01:00:00:0  
 30                                                | 0  
Column    56 (x0038), Len    21 (x0015)  
 ffff 3139 3030 2d30 312d 3031 3a30 303a 3030 3a30 | ..1900-01-01:00:00:0  
 30                                                | 0  
Column    57 (x0039), Len    10 (x000a)  
 ffff 0000 0000 0000 0000                          | ..........  
Column    58 (x003a), Len     4 (x0004)  
 ffff 0000                                         | ....  
Column    59 (x003b), Len    10 (x000a)  
 ffff 0000 0000 0000 0000                          | ..........  
Column    60 (x003c), Len    10 (x000a)  
 ffff 0000 0000 0000 0000                          | ..........  
Column    61 (x003d), Len    10 (x000a)  
 ffff 0000 0000 0000 0000                          | ..........  
Column    62 (x003e), Len    10 (x000a)  
 0000 0000 0000 0000 0000                          | ..........  
Column    63 (x003f), Len    21 (x0015)  
 ffff 3139 3030 2d30 312d 3031 3a30 303a 3030 3a30 | ..1900-01-01:00:00:0  
 30                                                | 0  
Column    64 (x0040), Len     4 (x0004)  
 ffff 0000                                         | ....  
Column    65 (x0041), Len     4 (x0004)  
 ffff 0000                                         | ....  
   
  从如上信息可以看到,在 Column    16  列中出现了 1901-01-00这样不符合date数据类型的值 从这里可以看到 column 16 对应表的是 BIRTHDAY列。


5、查询源端表对应列 BIRTHDAY 的数值,大致如下:
SQL> select   BIRTHDAY   from lis.L_patientinfo  where substr(BIRTHDAY,9,2)='00;
BIRTHDAY
-------------------
0000-01-01 00:00:00
0000-01-01 00:00:00
0000-01-01 00:00:00
0000-01-01 00:00:00
0000-01-01 00:00:00
0000-01-01 00:00:00
0000-01-01 00:00:00
0000-01-01 00:00:00
0000-01-01 00:00:00
0000-01-01 00:00:00
1916-01-00 00:00:00
1916-01-00 00:00:00
1916-01-00 00:00:00
1916-01-00 00:00:00
1916-01-00 00:00:00
ERROR:
ORA-01801: 日期格式对于内部缓冲区过长






已选择15行。

可见表中的数据有很多不符合date数值类型要求;

6、解决方案:
   1、MOS上查询到两篇关于该问题的文档: 文档 ID 2124703.1 及  文档 ID 2165689.1,后续附上两篇文档具体内容;
  2、鉴于用户表里面数据有可能年月日时间段都有可能出现不符合要求的值,及出现的值不固定等情形,在replicat参数文件中对该表做映射时,对具体的列映射所以采用如下方式来实现:
    MAP LIS.L_PATIENTINFO, TARGET TXYY_LIS.L_PATIENTINFO,
    COLMAP (USEDEFAULTS,
BIRTHDAY = @STRCAT ( @IF ( @STREQ (@STREXT(BIRTHDAY, 1, 4), "0000"), "0001", @STREXT(BIRTHDAY, 1, 4)),"-",@IF ( @STREQ (@STREXT(BIRTHDAY, 6, 7), "00"), "01", @STREXT(BIRTHDAY, 6, 7)),"-",@IF ( @STREQ (@STREXT(BIRTHDAY, 9, 10), "00"), "01", @STREXT(BIRTHDAY, 9, 10)),@STREXT(BIRTHDAY, 11, @STRLEN(BIRTHDAY)))
);
  注:如果在年月日中出现不符合要求的值按如下方式转换:年份转换为0001,月份转换为01,日转换为01,通过该方式,可以将该列中出现不符合要求的值进行转换。

7、MOS文档:
Looking For A Way To Reperr For A Replicat Which Abends With ORA-01847 Day Of Month Error (文档 ID 2165689.1)

In this Document

  Goal
  Solution


APPLIES TO:

Oracle GoldenGate - Version 11.2.1.0.20 and later
Information in this document applies to any platform.

GOAL

Randomly experiencing an update occurring in source where one of the dates will get captured by GG as 0001-01-00 00:00:00. When the replicat attempts to insert into target, it of course abends due to the month being captured as 00. A select on source displays this:
EVENT_END_DT_TM
--------------------
00-JAN-0001 00:00:00

We are trying to determine what is updating the source row to have this date but would like to be able to add a reperr to the replicat for the table so we can either set the field to match the date from another field or make it a valid date. 

O

CI Error ORA-01847: day of month must be between 1 and last day of month (status = 1847). INSERT INTO "PCLADB"."CLINICAL_EVENT" ("CLINICAL_EVENT_ID","ENCNTR_ID","PERSON_ID","EVENT_START_DT_TM","EVENT_ID","VALID_UNTIL_DT_TM","EVENT_TITLE_TEXT","VIEW_LEVEL","ORDER_ID","CATALOG_CD","ACCESSION_NBR","REFERENCE_NBR","PARENT_EVENT_ID","EVENT_RELTN_CD","VALID_FROM_DT_TM","EVENT_CLASS_CD","EVENT_CD","EVENT_TAG","EVENT_END_DT_TM","RESULT_VAL","RESULT_UNITS_CD","TASK_ASSAY_CD","RECORD_STATUS_CD","RESULT_STATUS_CD","PUBLISH_FLAG","NORMALCY_CD","RESOURCE_CD","COLLATING_SEQ","VERIFIED_DT_TM","PERFORMED_DT_TM","PERFORMED_PRSNL_ID","UPDT_DT_TM","NORMAL_LOW","NORMAL_HIGH","CLINSIG_UPDT_DT_TM","ORDER_ACTION_SEQUENCE","ENTRY_MODE_CD","EVENT_END_TZ","VERIFIED_TZ","LOC_NURSE_UNIT_CD","LOC_FACILITY_CD","OP_LOC_BUILDING_CD","OP_LOC_NURSE_UNIT_CD","PURGE_FLAG","IMMUNIZATION_IND","RES_ONLY_IND","BACKFILL_IND") VALUES (:a0,:a1,:a2,:a3,:a4,:a5,:a6,:a7,:a8,:a9,:a10,:a11,:a12,:a13,:a14,:a15,:a16,:a17,:a18,:a19,:a20,:a21,:a22,:a23,:a24
Aborting transaction on /home/oracle/ggs/dirdat/e1 beginning at seqno 27002 rba 120234022

 

SOLUTION

The data itself is bad and no issues with OGG.

You can try to convert the bad data, below is a sample, you may configure it to your situation accordingly:

MAP QBO_DATA."TXHEADERS_1, TARGET QBO_DATA."TXHEADERS_1,

COLMAP (USEDEFAULTS, ECLOUDSTATUS_TIMESTAMP = @IF ( @STRFIND ( ECLOUDSTATUS_TIMESTAMP, "0000") , @DATENOW(), ECLOUDSTATUS_TIMESTAMP));


来源: >
 


REPERROR Does Not Integrated Replicat ABENDs With OGG-00665 OCI Error Flushing Database Inbound Server (文档 ID 2124703.1)
REPERROR Does Not Integrated Replicat ABENDs With OGG-00665 OCI Error Flushing Database Inbound Server (文档 ID 2124703.1) 转到底部转到底部

In this Document

Symptoms
  Cause
  Solution
  References


APPLIES TO:

Oracle GoldenGate - Version 12.1.2.1.5 and later
Information in this document applies to any platform.

SYMPTOMS

On : 12.1.2.1.5 version, 1 - Oracle DB backend

Integrated Replicat ABENDs with ERROR OGG-00665 OCI Error Flushing database inbound server, 'OGG$R_IKFL2' (status = 26815-ORA-26815: Error from Apply Network Receiver for Apply "OGG$R_IKFL2" and Capture "replicat". ORA-01847: day of month must be between 1 and last day of month) even after specifying REPERROR (1847, IGNORE)

CAUSE

This issue is caused due to invalid date and REPERROR did not work due to Bug 21820934 - APPLY SERVER DOESN'T HANDLE DATA CONVERSIONS ERRORS LIKE 'ORA-01843'. 
 
According to Bug 21820934 - APPLY SERVER DOESN'T HANDLE DATA CONVERSIONS ERRORS LIKE 'ORA-01843'. The apply network receiver is not able to handle the conversion error.

SOLUTION

Classic replicat will ignore invalid dates. But integrated replicat does not ignore. 

Apply fix for bug 21820934 - APPLY SERVER DOESN'T HANDLE DATA CONVERSIONS ERRORS LIKE 'ORA-01843' and restart the replicat


来源: >
 



你可能感兴趣的:(oracle)