Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor #178

Open
ewu1209 opened this Issue · 2 comments

2 participants

@ewu1209

Does anyone know why I am receiving this error message? I am successfully able to connect to this database using Navicat or SqlDeveloper using the exact same parameters. I am also successfully able to connect to a different database using different connection string parameters.

var sys = require('sys');
var oracle = require('oracle');

var connectData = {
hostname: "11.6.309.144",
port: 1521,
database: "FF234J", // System ID (SID)
user: "BLAHUSERNAME",
password: "BLAHPASSWORD"

};

exports.dumpData = function (req, res) {
var sql = "SELECT * from BEATS where rownum < 3";

oracle.connect(connectData, function(err, connection) {
if (err) { console.log("Error connecting to db:", err); return; }
connection.execute(sql, [], function(err, results) {
if (err) { console.log("Error executing query:", err); return; }
res.json(results);
connection.close();
});
});

};

@gchristiansen

The value for the database field needs to be the service_name, not SID. Basically the listener on the database server does not know about the service named "FF234J" in your example. You can get a list of services that your listener knows about by logging on to the database server and issuing the "lsnrctl status" command

@ewu1209

Awesome, thank you for the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.