How to replicate Oracle XMLTYPE datatypes

This topic contains 0 replies, has 1 voice, and was last updated by  Simon Faas 1 month, 1 week ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #8750

    Simon Faas
    Participant

    In order to replicate tables with columns with datatype XMLTYPE you will need to do the the following:

    1. Add action Environment /Name=HVR_VIRTUAL_COLS /Value=1 (define this for location group ‘*’ and tables ‘*’) to your channel.

    2. (Re)run Table Select from the GUI (you can optionally specify the names of the tables containing XMLTYPE using Table Filter. this will make Table Select run faster)

    The XMLTYPE columns should now be visible in the Properties window of the tables containing XMLTYPE columns.
    Note that these columns will be shown with datatype CLOB.

    3. Actions

    For Log-based capture:

    Define 2 ColumnProperties actions; The first one will be used during replication. The 2nd will be used durin refresh

    a. Add action ColumnProperties /Name=xml /CaptureExpression=(select xmltype.getClobVal(t.xml) from document_xml t where t.document_id = {document_id}) /Context=!refresh
    Only define this for the capture location.

    b. Add action ColumnProperties /CaptureExpression=xmltype.getClobVal(xml) /Context=refresh
    Define this for capture and integrate locations

    For trigger-based capture

    Define action ColumnProperties /CaptureExpression=xmltype.getClobVal({xml})
    Define this for capture and integrate locations

    Notes:

    • Define this for each table containing an XMLTYPE datatype column.
    • Replace xml with the name of the column with the XMLTYPE datatype.
    • Replace document_xml with the name of the table.
    • Replace document_id with the name of the key column of the table.

    4. Add action ColumnProperties /Name=xml /IntegrateExpression=xmltype.createXml({xml})

    Define this for each table containing an XMLTYPE datatype column.
    Only define this for the integrate location.
    Replace xml with the name of the column with the XMLTYPE datatype.

    5. Add action DbIntegrate /DbProc /DbProcDuringRefresh

    Define this action for each table containing an XMLTYPE datatype column.
    Only define this for the integrate location.

    • This topic was modified 1 month, 1 week ago by  HVR Software.
    • This topic was modified 1 month, 1 week ago by  HVR Software.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

© 2017 HVR Software

Request Trial Contact Us