General considerations when unloading LOB and XML data


The following considerations apply to both methods of unloading LOB or XML data.

DIRECT YES restrictions

When DIRECT YES is in effect, UNLOAD PLUS terminates when any of the following conditions exist:

  • You specify multiple SELECT statements.
  • UNLOAD PLUS encounters an error during LOB or XML data processing (for example, a translation error).

DIRECT NO restrictions

When DIRECT NO is in effect, UNLOAD PLUS terminates if you specify BINARYXML on your field specification.

Incompatible options

The following table lists the command and installation options that are incompatible when you unload LOB or XML data. The table indicates how UNLOAD PLUS responds if your job contains these options.


The following table describes the options that are incompatible when unloading LOB or XML data:

Command or installation option

UNLOAD PLUS response

ANALYZE

Ignores this option for referenced files

CNTLCARDS other than Db2, DB2LOAD, or DB2DDL

Terminates

ESTROWS

Ignores this option for referenced files

FIXEDVARCHAR YES

Ignores this option for referenced files

FORMAT BMCLOAD

FORMAT CSV

FORMAT DSNTIAUL

FORMAT EXTERNAL

FORMAT XML

Terminates

IF

Terminates

INFILE

Terminates

MAXBLKSIZE

Ignores this option for referenced files

ORDER BY

Terminates if specified on a LOB or XML column

ORDER YES

Terminates if you also specify SPANNED YES

RECFM

Ignores this option for referenced files

ROWSETSZ

Ignores this option

UNLOAD TABLESPACE

Terminates

USELRECL

Ignores this option for referenced files

Other considerations

  • To unload LOB or XML data, specify the base table that contains the LOB or XML column. You cannot unload LOB or XML data directly from the auxiliary or XML table.
  • You can specify a LOB or XML column on a WHERE predicate only if the right side of the predicate is NULL. For any other predicates, UNLOAD PLUS terminates.
  • UNLOAD PLUS terminates if you attempt to convert BLOB, CLOB, DBCLOB, or XML data to a different data type.
  • You cannot unload LOB or XML data from a LOB or XML table space copy. However, you can unload the base table from a copy if you do not select a LOB or XML column.
  • When unloading LOB or XML data, you must supply sufficient above-the-bar storage to allow UNLOAD PLUS to process. We recommend that you specify REGION=0M or that you specify at least 32 GB for the MEMLIMIT parameter.
  • UNLOAD PLUS terminates if you attempt to unload a range partitioned RPN (aka PBR2) with XML or LOB columns if DIRECT YES is specified.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*