CLOSE

2023-10-27 09:57:43  Updated

The CLOSE stored procedure closes an internal or external LOB that was previously opened.

Syntax

DBMS_LOB.CLOSE (
lob_loc    IN OUT NOCOPY BLOB);

DBMS_LOB.CLOSE (
lob_loc    IN OUT NOCOPY CLOB CHARACTER SET ANY_CS);

Parameters

Parameter Description
lob_loc The locator of the LOB. For more information, see Usage notes.

Usage notes

  • CLOSE requires a round trip to the server for both internal and external LOBs. For internal LOBs, CLOSE triggers other code that relies on the CLOSE call.

  • You can choose not to wrap all LOB operations inside the Open/Close API. If you open a LOB, you must close it before you commit the transaction. An error is produced if you do not. When an internal LOB is closed, the functional and domain indexes on the LOB column are updated.

  • If you commit a transaction before you close all the LOBs opened by the transaction, an error will be returned. When an error occurs, the openness of the open LOBs is discarded, but the transaction is committed. That is, all the changes made to the LOB and non-LOB data in the transaction are committed, but the domain-based and function-based indexes are not updated. If this happens, you must rebuild the functional and domain indexes on the LOB column.

Contact Us