7 Replies Latest reply: May 21, 2014 3:19 PM by J.A. RSS

    EXT/REP some data from a table with condition > 90 days

    RafaelCeolim

      Hello every body!

       

      I Have a big problem (for me) in my GoldenGate config.

      I need to replicate a  table on target side if conditions. The conditions is replicate only 3 months of data.

      Above de describe of a table (We have two lob columns)

       

      SQL> desc TB_NFISCALAUTORIZACAO;

      Name                       Null?    Type

      ----------------------------------------- -------- ----------------------------

      CHAVEUNICA                            NOT NULL CHAR(28)

      CHAVEACESSO                         NOT NULL CHAR(44)

      DTPROCESSAMENTO               NOT NULL TIMESTAMP(3)

      NRRECIBO                                NOT NULL NUMBER(15)

      NRPROTOCOLO                        NOT NULL NUMBER(15)

      XMLNOTA                                  NOT NULL CLOB

      XMLPROTOCOLO                       NOT NULL CLOB

       

      The condition is very simple:

       

      select DTPROCESSAMENTO from TB_NFISCALAUTORIZACAO

      WHERE DTPROCESSAMENTO <= sysdate AND DTPROCESSAMENTO >= sysdate-90 order by 1;

       

      Number of rows

      SQL> select count (*)  from TB_NFISCALAUTORIZACAO WHERE DTPROCESSAMENTO <= sysdate AND DTPROCESSAMENTO >= sysdate-90 order by 1;

       

        COUNT(*)

      ----------

          148466

       

       

      I Think in use a SQLEXEC parameter to acquire this goal, but I don't mind how to use this.

       

      My environment is:

       

      Oracle EXADATA HALF and QUARTER

       

      Oracle GoldenGate binary 12.1

      Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

      With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

      Data Mining and Real Application Testing options

      SO Red Hat Enterprise Linux Server release 5.8 (Tikanga)

       

      Best Regards