Ruby-oci8 - Oracle interface for ruby
Ruby C Other
Latest commit 0ffd0c8 Feb 19, 2017 @kubo Delete :tcp_keepalive_intvl and :tcp_keepalive_probes in OCI8.propert…

Support :tcp_keepalive_time on macOS, Windows x86/x64 and Solaris x86_64 in addition to Linux i386/x86_64.


Gem Version Circle CI

What is ruby-oci8

Ruby-oci8 is a ruby interface for Oracle Database. The latest version is available for all Oracle versions after Oracle 10g including Oracle Instant Client.

Use ruby-oci8 2.0.6 for Oracle 8 or use ruby-oci8 2.1.8 for Oracle 9i.

Note that ruby 1.8 support was dropped in ruby-oci8 2.2.0. Use ruby-oci8 2.1.8 for ruby 1.8.

What's new

See {file:NEWS}.

Sample one-liner

Connect to scott/tiger, select emp and print as CSV format.

ruby -r oci8 -e "'scott', 'tiger').exec('select * from emp') do |r| puts r.join(','); end"



  • {file:docs/ Install for Oracle Full Client}
  • {file:docs/ Install for Oracle Instant Client}
  • {file:docs/ Install Binary Package}
  • {file:docs/ Install on OS X}

Report issues

Other documents

  • {file:docs/ Timeout Parameters}
  • {file:docs/ Conflicts between Local Connections and Child Process Handling on Unix}
  • {file:docs/ Bind an Array to IN-condition}
  • {file:docs/ LDAP Authentication and Function Interposition}


  • {file:COPYING 2-clause BSD-style license} from ruby-oci8 2.1.3
  • {file:COPYING_old old Ruby license} until 2.1.2