The CLOSE stored procedure closes an internal or external LOB that was previously opened.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
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 Considerations. |
Considerations
CLOSErequires a round trip to the server for both internal and externalLOBs. For internalLOBs,CLOSEtriggers other code that relies on theCLOSEcall.You can choose not to wrap all
LOBoperations inside the Open/Close API. If you open aLOB, you must close it before you commit the transaction. An error is produced if you do not. When an internalLOBis closed, the functional and domain indexes on theLOBcolumn are updated.If you commit a transaction before you close all the
LOBsopened by the transaction, an error will be returned. When an error occurs, the openness of the openLOBsis discarded, but the transaction is committed. That is, all the changes made to theLOBand non-LOBdata 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 theLOBcolumn.