LOB locators with the IBM Data Server Driver for JDBC and SQLJ
The IBM® Data Server Driver for JDBC and SQLJ can use LOB locators to retrieve data in LOB columns.
To cause JDBC to use LOB locators to retrieve data from LOB columns,
you need to set the fullyMaterializeLobData
property
to false
and set the progressiveStreaming
property
to NO (DB2BaseDataSource.NO
in an application program).
- If the data source does not support progressive locators:
If the value of fullyMaterializeLobData is
true
, LOB data is fully materialized within the JDBC driver when a row is fetched. If the value isfalse
, LOB data is streamed. The driver uses locators internally to retrieve LOB data in chunks on an as-needed basis It is highly recommended that you set this value tofalse
when you retrieve LOBs that contain large amounts of data. The default istrue
. - If the data source supports progressive streaming, also known
as dynamic data format:
The JDBC driver ignores the value of fullyMaterializeLobData if the progressiveStreaming property is set to YES (
DB2BaseDataSource.YES
in an application program) or is not set.
fullyMaterializeLobData
has no effect on stored
procedure parameters.
As in any other language, a LOB locator in a Java™ application is associated with only one data source. You cannot use a single LOB locator to move data between two different data sources. To move LOB data between two data sources, you need to materialize the LOB data when you retrieve it from a table in the first data source and then insert that data into the table in the second data source.