HVR Forum

Simon
HVR
Simon
Offline
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.
Responses (1)
  • Accepted Answer

    Tuesday, May 31 2016, 04:27 AM - #Permalink
    Make sure when running HVR Refresh to select the context "Refresh" in the HVR Refresh dialog.

    Refresh action 3b also enables HVR Compare to work, if you select the context "Refresh" when running HVR Compare.
    The reply is currently minimized Show
Your Reply