My Oracle Support Banner

SQL/LOB: Piecewise Writes and Reads of LOBs (Doc ID 50910.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Server - Enterprise Edition - Version: to - Release: 8.0.3 to 11.2
Oracle Server - Personal Edition - Version: to   [Release: 8.0.3 to 11.2]
Oracle Server - Standard Edition - Version: to   [Release: 8.0.3 to 11.2]
Information in this document applies to any platform.


This OCI program inserts a row into a BLOB using piecewise operations, currently with buffering enabled.
It also gives instructions for piecewise operations without buffering. Once the row has been inserted it is read back in pieces. In both the read and write no callback functions are used - the read and write functions are simply repeatedly called while OCI_NEED_DATA is returned.

The application needs the following table to be created:

SQL>create table lob_tab (c1 number, c2 blob);

Note type casts have been used on all the OCI calls, even when not required, simply to provide a clearer example.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.