Oracle Call Interface


Oracle Call Interface (OCI) is the comprehensive, high performance, native C language interface to Oracle Database.  It exposes the full power of Oracle Database to custom or packaged C applications.  Oracle In-Memory Database Cache also supports access from OCI programs.

A broad range of customers including Fortune 500 customers and ISVs develop high performance applications directly in OCI.

OCI is highly reliable.  Oracle tools such as SQL*Plus, Real Application Testing (RAT), SQL*Loader, and Data-Pump all use OCI.  OCI also provides the foundation on which other language-specific interfaces such as Oracle JDBC-OCI, Oracle Data Provider for Net (ODP.Net), Oracle Precompilers, Oracle ODBC, and Oracle C++ Call Interface (OCCI) drivers are built.  OCI is also used by leading scripting language drivers such as PHP OCI8, ruby-oci8, Perl DBD::Oracle, Python cx_Oracle, and  the statistical programming language R's ROracle driver.

OCI libraries are included by default in Oracle Database 12c.  OCI is also in the lightweight Oracle Instant Client, allowing ISVs and customers to quickly install and deploy OCI applications and tools.  See the Oracle Instant Client page for more information.

Best Practices for Application Performance, Scalability, and Availability

View this great Oracle Open World session from Nancy Ikeda, a senior developer at Oracle.


The session description was: Best practice coding samples and techniques show how to resolve connection management, statement execution, and data fetching inefficiencies in applications using APIs such as JDBC, OCI, ODBC, ODP.Net, or higher-level scripting languages. This session shows how the Automatic Workload Repository feature of Oracle Database and Automatic Database Diagnostic Monitor profiling tools help diagnose application design and coding issues. Specific solutions show how to resolve these and other issues to enhance applications for scalability and resilience. Among the solutions discussed are Oracle Database 12c’s new client configuration file. Developers or DBAs can use it to tune and configure applications without modifying code. Examples use JDBC and OCI but are applicable to all APIs.

What's New in Oracle Database 12c

The new OCI features in Oracle Database 12c include:

  • Support for multitenant container databases and pluggable databases
  • Increased size limit for VARCHAR2, NVARCHAR2, and RAW data types to 32K
  • Large row counts
  • Support for PL/SQL package types and Boolean types for PL/SQL parameters
  • Auto-tuning of the client statement cache
  • Support of Implicit Result Set
  • Support of IDENTITY/auto-increment columns
  • oraaccess.xml configuration file for specifying client-side deployment settings
  • Support for SQL translation feature in Oracle Database
  • Row count per iteration for array DML
  • Lifetime setting for sessions in a session pool
  • Support for monitoring database operations
  • Support for Transaction Guard
  • New and changed OCI XStream features
  • Manageability support for XStream and GoldenGate integration

What's New in Oracle Database 11g R1 & 11g R2

The new OCI features in Oracle Database 11g Release 2 include:

  • Ease of Day-Light Savings Transition (DLST) Upgrades: Support for different version of Timezone files on clients and servers under certain scenarios
  • DRCP available to custom connection pools; and better connection monitoring support for DBAs.
    • new gv$cpool_conn_info view
  • Non-intrusive Performance Acceleration thru Table Annotation for Client-side Query Result Cache
  • Ref Cursor Pre-Fetching - saves roundtrips to the database
  • 64-bit Integer Host Datatype for OCI Bind and Define calls

The new OCI features in Oracle Database 11g Release 1 include:

  • OCI and Precompilers support for In-Memory Database Cache 11g (formerly TimesTen)
    • IMDB and IMDB Cache integration
  • Database Resident Connection Pool (DRCP)
  • Query Change Notification
  • Client Query Result Cache
  • Runtime Connection Load Balancing in OCI Session Pool
  • Binding and Defining Multiple Buffers in a single call
  • Implicit Fetching of Rowids in SELECT ... FOR UPDATE
  • Prefetching of LOB data
  • SecureFiles LOB APIs
  • XDB Binary XML
  • Drop-in compatibility with 10g
  • Fault Diagnosability

Technical Information

 Application Development Videos
Oracle Instant Client
 Oracle Instant Client
Oracle Database 11g
 Building High Performance Drivers for Oracle (PDF)
 Database Resident Connection Pooling (DRCP) (PDF)
Oracle Database 10g
 Using Microsoft Intellisense for OCI in Oracle 10g
 Application Failover in Oracle Database 11g
 Transparent Application Failover
Oracle9i Database
 Oracle9i Database Release 2 New Data Access Features
 Oracle9i Database Release 1 New Data Access Features
 OCI Scrollable Cursors (PDF)
 Boosting SQL Performance with cursor_sharing (PDF)

Oracle Database Cloud

ODTUG Kscope 15