Considerations for replicating the XML data type

DB2® Version 9.1 and later supports native storage of XML documents. You can replicate or publish the XML documents.

The XML documents are replicated within the transaction message, similar to how other columns are replicated. If the XML documents are large, you might need to increase the maximum message size for the IBM® MQ messages. If an XML document exceeds the maximum message size for the send queue, it is not sent. You can set the XML_TOO_BIG_ACTION for the send queue in the following ways in the IBMQREP_SENDQUEUES table to define the action that Q Capture takes:

Q (default)
The Q Capture program follows the error action that is defined for the send queue.
E
The Q Capture program sends an XML placeholder. If the XML placeholder does not fit into a message, Q Capture follows the error action for the queue.

The Q Apply program adds a row to the IBMQREP_EXCEPTIONS table any time that XML documents cannot be sent.

In addition to replicating the DB2 XML data type, you can replicate XML documents to federated targets that support XML data types, or you can map the source XML column to a CLOB or BLOB column at the target.

Prerequisite: You must have a unique index on your source table to replicate XML data.

Restrictions

The XML data type has the following restrictions:
  • You cannot filter rows based on the contents of an XML document.
  • You cannot replicate XML columns that you defined as a unique index.
  • The documents are not validated by the Q Apply program.
  • You cannot replicate the XML schema registrations.
  • On z/OS®, you cannot perform an automatic load for tables that contain XML columns if the target subsystem is older than DB2 11 for z/OS. Automatic load from XML columns is supported for target tables on DB2 11 for z/OS and newer.
  • You cannot replicate XML columns from Oracle sources.
  • User-defined unique indexes on XPATH expressions on XML columns are not supported. To replicate these columns, drop the unique index and use a non-unique index.