Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

node.js driver to connect with an oracle database.

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time



var oracle = require("oracle");

oracle.connect({ "hostname": "localhost", "user": "test", "password": "test" }, function(err, connection) {
  // selecting rows
  connection.execute("SELECT * FROM person WHERE name = :1", ['bob smith'], function(err, results) {
    // results will be an array of objects

  // inserting with return value
    "INSERT INTO person (name) VALUES (:1) RETURNING id INTO :2",
    ['joe ferner', new oracle.OutParam()],
    function(err, results) {
      // results.updateCount = 1
      // results.returnParam = the id of the person just inserted


  connection.commit(function(err) {
    // transaction committed

  connection.rollback(function(err) {
    // transaction rolledback

  connection.close(); // call this when you are done with the connection


Install Oracle/Oracle Express

  • Download Oracle Express 10g
  • Download Instant Client
    • Instant Client Package - Basic Lite
    • Instant Client Package - SQL*Plus
    • Instant Client Package - SDK
  • Install Oracle Express (Ubuntu)
sudo dpkg -i oracle-xe_11.
sudo apt-get install alien
sudo alien oracle-instantclient11.2-*
sudo dpkg -i oracle-instantclient11.2-*.deb
sudo /etc/init.d/oracle-xe configure
  • Open http://localhost:9999/apex/ change 9999 to the port you configured. Log-in with "sys" and the password.
  • Create a user called "test" with password "test" and give all accesses.
sudo vi /etc/ -- add this line /usr/lib/oracle/11.2/client/lib/
sudo ldconfig

export ORACLE_SID=test
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/11.2/server
export OCI_INCLUDE_DIR=/usr/include/oracle/11.2/client/
export OCI_LIB_DIR=/usr/lib/oracle/11.2/client/lib/
sqlplus test@XE


node-waf configure
node-waf build
nodeunit tests/*
Something went wrong with that request. Please try again.