nearinfinity/node-oracle — pull request #49 by flyth (2013-06-03 08:20:47+00:00)
Title: Support for TNS-strings

Adds support for TNS-strings like

(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)))

instead of using hostname + database. This should make it possible to connect to almost any oracle database, including all the features TNS brings.

Connect looks like this:

var oracle = require("oracle");

oracle.connect({
"tns": "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)))",
"user": "test",
"password": "test"
}, function(err, connection) {
...
}