Oracle
Requirements
- Build: nothing; the driver includes ODPI-C.
- Run: the Oracle client libraries (
libclntsh.so), for example from the Oracle Instant Client. ODPI-C loads them at run time: their directory must be inLD_LIBRARY_PATH(or setORACLE_HOME).
Connection string
oracle://[user.password@]host[:port]/service
The driver connects with the Easy Connect syntax //host:port/service. Only service names are supported, not SIDs nor tnsnames.ora aliases.
Example, with the Oracle Free container:
oracle://localhost:1521/FREEPDB1
Options and environment
client_encodingis ignored: setNLS_LANGbefore running the program.- The variables
DPI_DEBUG_LEVELandDPI_DEBUG_PREFIXenable the traces of ODPI-C.
Transactions
Oracle always works in a transaction: with the default native autocommit mode, a program must COMMIT its changes, as with Pro*COBOL.
Data types
ROWIDcolumns are fetched as character strings.- Parameters can be written
:1,:name, or$1(converted by the driver).
NoteTo be completed
DATE/TIMESTAMP conversions, NUMBER precision, CLOB/BLOB.
Testing
NoteTo be completed
How to run the Oracle Free container (gvenzl/oracle-free) and create a test user.