The OPEN procedure is used to open an internal or external LOB in a specified mode. Valid modes include read-only and read/write.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
DBMS_LOB.OPEN (
lob_loc IN OUT NOCOPY BLOB,
open_mode IN BINARY_INTEGER);
DBMS_LOB.OPEN (
lob_loc IN OUT NOCOPY CLOB CHARACTER SET ANY_CS,
open_mode IN BINARY_INTEGER);
Parameters
| Parameter | Description |
|---|---|
| lob_loc | The LOB locator. For more information, see Use DBMS_LOB. |
| open_mode | The mode in which to open the LOB. For BLOB and CLOB types, the mode can be: LOB_READONLY or LOB_READWRITE. |
Considerations
Note
If you open a LOB in read-only mode and attempt to write to it, an error will be returned.
The
OPENprocedure requires a round trip to the internal and externalLOBservers. For internalLOBobjects, theOPENprocedure triggers other code that depends on theOPENcall.It is not mandatory to wrap all
LOBoperations in an Open/Close interface. If you open aLOB, you must close it before committing the transaction, otherwise an error will occur. When closing an internalLOB, the function-based and domain-based indexes on theLOBcolumn will be updated.Committing a transaction before closing all
LOBobjects opened by the transaction will result in an error. When an error occurs, the open status of theLOBwill be discarded, but the transaction will still be committed, including all changes made toLOBand non-LOBdata within the transaction. However, the domain-based and function-based indexes will not be updated. In such cases, you should rebuild the function-based and domain-based indexes on theLOBcolumn.
