Mapping datatype in oracle goldengate

Hi
Is it possible to map datatype in oracle goldengate? Suppose we have same table name on both source & target database but column widths are different.

Hi again,
It might be possible to code a mapping post processor that transforms eg. a column definition: my_column_clob varchar2(4000) => my_column clob
but I have no clue on how the runtime platform would react to this, eg. when reporting detailed errors. Implementing on your own means that you will lose some standard OWB functionality also - eg. upgrade/import table.
Regards, Hans Henrik

Similar Messages

  • How to limit extract base on date condition in oracle goldengate?

    Hi all,
    I have a problem about date condition in extract parameter:
    My extract parameter:
    GGSCI>edit params ext1
    EXTRACT ext1
    USERID ggadmin, PASSWORD ggadmin
    EXTTRAIL /u01/app/oracle/product/gg/dirdat/lt
    DDL INCLUDE MAPPED
    table test.chien, where (id >4 and TDATE>TRUNC(TO_DATE('01/01/2011 00:00:00','DD/MM/YYYY HH24:MI:SS')));
    when I start extract, have a error:
    +7. 2011-11-04 07:06:45 ERROR OGG-01157 Oracle GoldenGate Capture for Oracle, ext1.prm: Error in WHERE clause for TEST.CHIEN.+
    I check where condition in the select statement is ok.
    I don't know what is different between condition in params of extract and condition in select statement?
    Please explaint to me and hepl me how to limit extract capture base date condition,
    Thanks so much.
    Omni
    Edited by: user12378049 on 21:46 03-11-2011

    Thanks for Stevencallan's reply.
    I try again with Stevencallan's way, but not successful.
    TABLE SCOTT.EMP, sqlpredicate "where EMPNO >4 AND HIREDATE> TO_DATE('01/01/1911 00:00:00','DD/MM/YYYY HH24:MI:SS')"; All Error is the same my old post:
    2011-11-07 05:37:52  INFO    OGG-01517  Oracle GoldenGate Capture for Oracle, ext1.prm:  Position of first record processed Sequence 26, RBA 21009936, SCN 0.1498876, Nov 7, 2011 5:34:14 AM.
    2011-11-07 05:37:53  ERROR   OGG-00212  Oracle GoldenGate Capture for Oracle, ext1.prm:  Invalid option for MAP: "where.
    2011-11-07 05:37:53  ERROR   OGG-01668  Oracle GoldenGate Capture for Oracle, ext1.prm:  PROCESS ABENDING. {code}
    The trunc(date) to round date to the first time in the day. I think it is not reason of the error.
    {code} The TRUNC (date) function returns date with the time portion of the day truncated to the unit specified by the format model fmt. The value returned is always of datatype DATE, even if you specify a different datetime datatype for date. If you omit fmt, then date is truncated to the nearest day. Please refer to "ROUND and TRUNC Date Functions" for the permitted format models to use in fmt.
    {code}
    I have no resolution for this problem yet.
    Who had passed this case and had resolution? Please tell me your way
    Thanks so much.
    ---Omni                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Error Handling in Oracle GoldenGate

    Hi:
    i connect two databses with Oracle GoldenGate in Active-Active bidirectional replication process.
    i required when any replicat fails it colud be sote in table with values. like i made the change in source database , while replicating it fails then this record store in a table.
    i want to use as schema for all tables. there is no common column in all the tables.
    Could you please help me out.
    Regards,
    Abhishek

    You can map errors into an exceptions table. You can use one table for many errors, but you have to code whatever to make the insert work. You can do a one-to-one mapping too, just depends on how granular you want the exceptions table to be. The hard part is making sure you account for expected errors.
    -- Specify mapping of exceptions to exceptions table:
    MAP <owner>.*, TARGET <owner>.<exceptions>, EXCEPTIONSONLY;
    An example shown on pages 96-97 of 11.1 Admin guide:
    MAP swilkes.date_test, TARGET swilkes.date_test, &
    REPERROR (21000, EXCEPTION), &
    SQLEXEC (ID lookup, ON UPDATE, &
    QUERY "select count(*) conflict from date_test where t_id = ? and &
    t_timestamp > ?", &
    PARAMS (p1 = t_id, p2 = t_timestamp), BEFOREFILTER, ERROR REPORT, &
    TRACE ALL),&
    FILTER (lookup.conflict = 0, ON UPDATE, RAISEERROR 21000);
    MAP swilkes.date_test, TARGET swilkes.date_test_exc, EXCEPTIONSONLY, &
    INSERTALLRECORDS, &
    COLMAP (USEDEFAULTS, errtype = "UPDATE FILTER FAILED.");
    An exceptions table could look like:
    --8 characters max for the replicat name
    --varchar2(30) via object naming rules in Oracle for the table name
    --error returned is numeric, and so on
    create table ggs_admin.exceptions
    ( rep_name varchar2(8)
    , table_name varchar2(30)
    , errno number
    , dberrmsg varchar2(4000)
    , optype varchar2(20)
    , errtype varchar2(20)
    , committimestamp timestamp);

  • OGG-01028  Oracle GoldenGate Delivery for Oracle, rep_2.prm:  Incompatible record (101)

    1. After imported data,i want start rep_2 at a CSN point but it dosn't work
    2013-09-13 20:22:15  ERROR   OGG-01028  Oracle GoldenGate Delivery for Oracle, rep_2.prm:  Incompatible record (101) in ./dirdat/r2000000, rba 86102323 (getting header).
    2013-09-13 20:22:15  ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle, rep_2.prm:  PROCESS ABENDING.
    2.
    So i try many times ,i want the rep_2 to find a avalibale file to start(ignore some file )
    ALTER REPLICAT rep_2, EXTSEQNO X
    Still comes OGG-01028
    3.
    Logdump 3 >open ./dirdat/r2000000
    Current LogTrail is /home/oracle/ogg/dirdat/r2000000
    Logdump 4 >ghdr on
    Logdump 5 >count
    I didn't find any bad rows
    So somebody help!!!

    [oracle@p49drzdb dirprm]$ cat rep_2.prm
    REPLICAT rep_2
    SETENV (NLS_LANG=AMERICAN_AMERICA.AL32UTF8)
    USERID ogg, PASSWORD ogg
    ASSUMETARGETDEFS
    DBOPTIONS SUPPRESSTRIGGERS
    ddl include all
    DDLERROR DEFAULT DISCARD IGNOREMISSINGOBJECTS
    REPERROR (DEFAULT, DISCARD)
    DISCARDFILE  ./dirrpt/rep_r2.DSC, PURGE
    MAP ...

  • Error while running code template mapping between two oracle tables

    Hello All
    Iam getting the following error while running code template mapping between two oracle tables. Using OWB 11gR2 and oracle 11gR2 DB.
    java.sql.SQLException: ORA-20001: The active workspace is not valid as a target for this mapping
    c: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1065
    ORA-06512: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1087
    ORA-06512: at "SOURCE.FILENET_EX_UNIT_3", line 555
    ORA-06512: at line 4                                        
    Job 51 error: java.sql.SQLException: ORA-20001: The active workspace is not valid as a target for this mapping
    ORA-06512: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1065
    ORA-06512: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1087
    ORA-06512: at "SOURCE.FILENET_EX_UNIT_3", line 555
    ORA-06512: at line 4
    Quick help is highly appreciated.

    Dera Dallan
    its only a target user for the workspace where you are deploying the mapping from.
    I have two repositories for two different projects. each repositary has its own workspace.
    ex:-
    Project 1
    Work space bpms_rep_owner
    Repositary owner bpms_rep_owner
    Repositary user bpms_rep_user
    Project 2
    Work space dem_rep_owner
    Repositary owner dem_rep_owner
    Repositary user dem_rep_user
    Reg
    S.Gyazuddin

  • XSU Problem:Error-- Cannot map Unicode to Oracle character

    Hi, I am using XSU to get the resultset from database(oracle 9.2.0.6.0) as XML.When I query data from some columns and get the XMLString, they give me error -"Cannot map Unicode to Oracle character". The database charset is "US7ASCII" .
    One column is storing Chinese with ''US7ASCII".When xmlString Result contianer
    the column,there is "oracle.xml.sql.OracleXMLSQLException: Cannot map Unicode to Oracle character".But If xmlString Result don't container that column,it run very good.
    The program container these libs: ojdbc14.jar,xmlparserv2.jar,xdb.jar,nls_charset12.jar,xsu12.jar.
    The program code:
    public class OracleXmlParse {
    public static void main(String[] args) {
    try{
    DriverManagerDataSource dataSource = new DriverManagerDataSource("oracle.jdbc.driver.OracleDriver",
                        "jdbc:oracle:thin:@168.1.1.136:1521:imis","ims","ims");
    String selectSQL = "select AREA_CODE,AREA_NAME,REGION_CODE,AREA_NAME_CN from CDM_AREA";
    OracleXMLQuery query = new OracleXMLQuery(conn,selectSQL);
    query.setEncoding("UTF-8");
    String str = query.getXMLString();
    System.out.println(str);
    conn.close();
    }catch(SQLException e){
                   e.printStackTrace();
    Exception:
    Exception in thread "main" oracle.xml.sql.OracleXMLSQLException: Cannot map Unicode to Oracle character.
         at oracle.xml.sql.core.OracleXMLConvert.getXML(OracleXMLConvert.java:1015)
         at oracle.xml.sql.query.OracleXMLQuery.getXMLString(OracleXMLQuery.java:267)
         at oracle.xml.sql.query.OracleXMLQuery.getXMLString(OracleXMLQuery.java:221)
         at oracle.xml.sql.query.OracleXMLQuery.getXMLString(OracleXMLQuery.java:198)
         at procedure.OracleXmlParse.main(OracleXmlParse.java:34)
    The column that store chinese is AREA_NAME_CN .When "selectSQL " is equal to "select AREA_CODE,AREA_NAME,REGION_CODE from CDM_AREA",the program is ok.
    Please help.
    Message was edited by:
    user542404
    Message was edited by:
    user542404

    So, What is the solution ? Is there something I can do in my code ? My program gives the exception and stops. I am not even interested to fetch the data, which are giving this error.

  • TIMESTAMP datatype in Oracle 8i.

    'TIMESTAMP' datatype is not to be available in Oracle 8i.
    Is there an equivalent datatype in Oracle 8i as 'TIMESTAMP' in 9i?
    Regards,
    Bhagat

    Timestamp was a new globalization feature in 9i. The only way to handle time in 8i is with the regular DATE type and traditional date arithmetics.

  • Oracle streams versus oracle goldengate

    Hi all,
    I just found out about oracle goldengate and was wondering if anyone of you could share what are the differences between it and oracle streams when it comes to change data capture capabilities? Also, how does owb come into play when it comes to oracle goldengate? For instance owb 11gr2 has got cdc capabilties so does it mean its cdc capabilities is based on oracle streams?

    Hi,
    With CDC/Streams you have two choices:
    process the Oracle logfiles in the source-database/server and read the resulting changerecords from the target database/server or
    transport the logfiles to the target database/server and process them there.
    The advantage of the latter case is that you relieve the source from the load of processing the logfiles, but target and and source then need to have the same database and server versions. Golden Gate, if I understand correctly, converts the logfiles to its own format (with mimimal load) and these can be processed by Golden Gate on a target database and server of a different version from the source.
    So you have the advantage (little load on the source) without the disadvantage (source and target have to be of equal versions).
    Regards,
    Jaap.

  • Install oracle goldengate at ASM  for data replication in RAC system?

    Hi Experts,
    We have 2 RAC server and each server have a 4 nodes RAC with 10R2 database in linux.
    We will install oracle goldengate as data replication between two RAC servers.
    Our database install on ASM in SAN box in linux
    Based on Goldengate install requirement, 16.     Set a shared driver that is accessed by each RAC nodes
    and install goldebgate on shared driver.
    As I understand, can we install goldengate on ASM that is shared by each node?
    Or we MUST set up other shared driver ( NO ASM) for installation of goldengate.
    Please advise me?
    Thanks
    Jim

    http://www.oracle.com/technology/products/goldengate/10/whitepapers/ha-goldengate-whitepaper.pdf
    This will answer your questions.

  • How to handle national character set datatypes in oracle?

    Hi
    Can anyone tell me how to handle national character set datatypes in oracle?
    Thanks in advance

    And for data manipulation, append "N" the literal values being used in the command.
    The "N" indicates that the string is to be treated as Unicode Text.
    For Example: insert into TableName (ColumnName) values (N'ValueToBeInserted');

  • Link to download Oracle GoldenGate 11g for MySQL

    Dear All,
    I am in search of Oracle GoldenGate 11g for MySQL. Somehow could not find it download.oracle.com and edelivery.
    If someone knows how to download it please guide me.
    Thanks, Imran

    You can download from here:
    https://edelivery.oracle.com/EPD/Search/handle_go
    I used GG on windows V32424-01 with mysql and it works fine
    Cheers

  • Equivalent datatype in Oracle for datetime of SQL Server

    Hello Everyone,
    I'm very much new to Oracle. I have been working with SQL Server since 3yrs. Currently I'm working with Oracle 11g.
    What is the equivalent datatype in oracle for datetime in sql server with which has the format YYYY-MM-DD HH:MM:SS?
    I tried with timestamp and date which didnt solve my prob.... Please help me in using the equivalent datatype for the format provided above...
    Regards,
    Bhanu Yalamanchi.

    Oracle date format can be anything you want, either by default at the session level or preferably explicitly using to_char and a format mask.
    Format masks are documented here.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements004.htm#CDEHIFJA
    SQL> create table t (d date);
    Table created.
    SQL> insert into t values (sysdate);
    1 row created.
    SQL> select * from t;
    D
    19-JUL-11
    SQL> alter session set nls_date_format = 'YYYY-MM-DD HH:MI:SS';
    Session altered.
    SQL> select * from t;
    D
    2011-07-19 08:27:59
    SQL> select d, to_char(d, 'YYYY-MM-DD'), to_char(d,'Day') from t;
    D                   TO_CHAR(D, TO_CHAR(D
    2011-07-19 08:27:59 2011-07-19 Tuesday
    SQL> alter session set nls_date_format = 'DD-MON-YY';
    Session altered.
    SQL> select d, to_char(d, 'YYYY-MM-DD HH24:MI:SS') from t;
    D         TO_CHAR(D,'YYYY-MM-
    19-JUL-11 2011-07-19 08:27:59

  • Can we use oracle goldengate 11.2.1.0.1 for oracle 10.2.0.4.0

    Hello,
    I have a question in mind...
    We have a db server running on windows server 2008 with the db version 10.2.0.4 running on it. we have migrate the db from this windows server to a linux box (redhat linux 5.2) with the same version of oracle on it. We have to make a real time replication of data between these cross platforms using oracle goldengate.
    Now my question is that, is it possible to create a real time replication between these two platforms using oracle goldengate 11.2 as the db version running on both the servers are 10.2 as we are not getting a 10g s/w for goldengate at oracle.com or is there any other possible ways to do a real time replication other than using a golden gate ?
    Thanks & Regards
    Nimai Karmakar

    Pl continue the discussion in your original post - data migration between windows and linux

  • TIPS(20) : MAKE A MAP OF YOUR ORACLE FILES

    제품 : SQL*PLUS
    작성날짜 : 1996-11-12
    TIPS(20) : Make a Map of Your Oracle Files
    ==========================================
    The script below generates a report on all the Oracle files
    (database, redo log, and control) in an Oracle UNIX system.
    It's like a map of your Oracle files. Moreover, it also makes available other
    information (size and physical I/Os, if applicable) related to the files.
    THE SCRIPT
    rem
    rem File: filemap.sql
    rem
    rem This script provides information on the location/path, file name,
    rem size and physical I/Os (if applicable) of all the Oracle files
    rem (database, control and redo log) in an Oracle/UNIX platform.
    rem
    rem
    set pages 999
    col path format a20 heading 'Path'
    col fname format a15 heading 'File Name'
    col fsize format 999b heading 'M bytes'
    col pr format 999999b heading 'Phy. Reads'
    col pw format 999999b heading 'Phy. Writes'
    break on path skip 1
    spool zzfilemap.rep
    select substr(name,1,instr(name, '/', -1)-1 ) path,
    substr(name,instr(name, '/', -1)+1 ) fname,
    bytes/1048576 fsize,
    phyrds pr,
    phywrts pw
    from v$datafile df, v$filestat fs
    where df.file# = fs.file#
    UNION
    select substr(name,1,instr(name, '/', -1)-1 ) path,
    substr(name,instr(name, '/', -1)+1 ) fname,
    0 fsize,
    0 pr,
    0 pw
    from v$controlfile
    UNION
    select substr(lgf.member,1,instr(lgf.member,'/', -1)-1) path,
    substr(lgf.member,instr(lgf.member, '/', -1)+1 ) fname,
    lg.bytes/1048576 fsize,
    0 pr,
    0 pw
    from v$logfile lgf, v$log lg
    where lgf.group# = lg.group#
    order by 1,2
    spool off
    exit
    --------------------------Sample Output----------------------------------
    Path File Name M bytes Phy. Reads Phy. Writes
    /u01/oradata/PDB7 control3.ctl
    rdmxf1.dbf 50 694 2781
    redo1b.log 10
    redo2b.log 10
    redo3b.log 10
    tempf1.dbf 30
    /u02/oradata/PDB7 control1.ctl
    rbsf1.dbf 40 6 2813
    redo1a.log 10
    redo2a.log 10
    redo3a.log 10
    /u03/oradata/PDB7 control2.ctl
    genf1.dbf 50 1551 396
    rdmf1.dbf 100 4403 2335
    systemf1.dbf 50 5905 1116
    toolsf1.dbf 15 2979
    16 rows selected.

    Thanks for your reply, but I'm not sure if you understood my point correctly.
    I didn't exactly mean to use my iPod as a USB memory stick.
    What I meant was that if I copied the contents of my iPod to a DVD and if something weird happened to my music player and I would have to format it...
    Could I then just copy the files (I had burned on the DVD) back to my iPod and it would be the same as before? My music would be saved?

  • Converting ntext datatype of MS SQL to LOB datatype of Oracle using ODI

    Hi
    Could anyone help me how I can convert ntext datatype of MS SQL to BLOB/CLOB datatype of ORACLE using ODI tool? I have tried and it seems that ODI couldn't able to create working table with datatype of LOB.
    Thank you in advance.
    Myat

    Try using the Incremental Update (PL/SQL) IKM. I believe this will only handle 1 CLOB column in any interface - also pay attention to the KM notes for additional constraints and requirements.
    Make your staging area the same as the target.
    Use the TO_CLOB function to convert the data for your field, and execute this on the target.

Maybe you are looking for