About ODPI-C
Oracle Database Programming Interface for C (ODPI-C) is an open source library of C code that simplifies the use of common Oracle Call Interface (OCI) features for Oracle Database drivers and user applications. The ODPI-C project is open source and maintained by Oracle Corp.
Installation
See ODPI-C Installation.
Documentation
See ODPI-C Documentation and Release Notes.
Samples
See the samples directory.
Help
Please report bugs and ask questions using GitHub issues.
Tests
To run the test suite see test/README.
Source code
Download source from GitHub.
A sample Makefile is provided if you wish to build ODPI-C as a shared library. Otherwise, include the ODPI-C source code in your project. ODPI-C uses the shared library loading mechanism available on each supported platform to load the Oracle Client library at runtime. This allows code using ODPI-C to be built only once, and then run using Oracle Client 11.2, 12.1 and 12.2, 18c, 19c and 21c libraries.
Oracle Client libraries are available in the free Oracle Instant Client "Basic" and "Basic Light" packages. Client libraries are also available in any Oracle Database installation or full Oracle Client installation.
ODPI-C has been tested on Linux, Windows and macOS. Other platforms should also work but have not been tested. On Windows, Visual Studio 2008 or higher is required. On macOS, Xcode 6 or higher is required. On Linux, GCC 4.4 or higher is required.
Drivers Using ODPI-C
Oracle Drivers
- python-oracledb Python interface (Previously known as cx_Oracle)
- node-oracledb Node.js module
Third-party Drivers
- godror Go Driver
- odpic-raw Haskell Raw Bindings
- ruby-ODPI Ruby Interface
- rust-oracle Driver for Rust
- Oracle.jl Driver for Julia
- oranif Driver for Erlang
- nimodpi Driver for Nim
ODPI-C Features
- 11gR2, 12c, 18c, 19c, 21c, and 23ai Oracle Client support
- Oracle Database 9.2 and higher support (depending on Oracle Client version)
- SQL and PL/SQL execution
- Character datatypes (CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, NCLOB, LONG)
- Numeric datatypes (NUMBER, BINARY_FLOAT, BINARY_DOUBLE)
- Dates, Timestamps, Intervals
- Binary types (BLOB, BFILE, RAW, LONG RAW)
- SQL BOOLEAN
- PL/SQL datatypes (PLS_INTEGER, BOOLEAN, Collections, Records)
- JSON
- SODA (Simple Oracle Document Access)
- Call Timeouts
- User Defined Types
- REF CURSOR, Nested cursors, Implicit Result Sets
- Array fetch
- Array bind/execute
- Connection pools (homogeneous and non-homogeneous with proxy authentication) with high availability features
- Standalone connections
- Database Resident Connection Pooling (DRCP)
- External authentication
- Statement caching (tagging)
- End-to-end tracing, mid-tier authentication and auditing (action, module, client identifier, client info, database operation)
- Edition Based Redefinition
- Scrollable cursors
- DML RETURNING
- Privileged connection support (SYSDBA, SYSOPER, SYSASM, PRELIM_AUTH)
- Database Startup/Shutdown
- Session Tagging
- Proxy authentication
- Batch Errors
- Array DML Row Counts
- Query Result Caching
- Application Continuity (with some limitations)
- Query Metadata
- Password Change
- Two-Phase Commits
- Oracle Call Interface (OCI) Client Version and Server Version
- Connection Validation (when acquired from session pool or DRCP)
- Continuous Query Notification
- Advanced Queuing
- Easily extensible via direct OCI calls
License
Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
This program is free software: you can modify it and/or redistribute it under the terms of:
(i) the Universal Permissive License v 1.0 or at your option, any later version (http://oss.oracle.com/licenses/upl); and/or
(ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0)