Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Some software I'm writing needs to query an oracle database - the DBA is away for a while, so all I have to go on is some source code from another application that connects to the same database (and I'm not even sure it's current). The java connect string looks like this:


Which the jdbc documentation tells me means that the server address/port is and the 'service name' is srip. I've created a corresponding entry in tnsnames.ora that looks like this:

    (ADDRESS = (PROTOCOL = TCP)(HOST = = 1521))
     (SERVICE_NAME = srip)

In the ODBC configuration dialog the oracle client finds the 'mydb' entry and lists it under 'TNS Service Name'. When I try to 'test connection', it returns instantly with error ORA-12514: TNS:listener does not currently know of service requested in connect decsriptor. I guess this means the SERVICE_NAME entry is wrong, maybe it has been changed. Is there any way to find out what service names are available on a remote server that I don't have any other access to?

share|improve this question
up vote 4 down vote accepted

Yes you can do this kind of stuff but you would need either to be granted on the database server either to know the listener password (if one has been set).

Before this, you could:

  1. Edit your tns.ora and replace "SERVICE_NAME" instead of "SID".
  2. Check your sqlnet.ora file for a incorrect "DEFAULT_DOMAIN" directive.
share|improve this answer
Using SID instead of SERVICE_NAME worked, thank you! – K. P. Whitford Feb 22 '11 at 18:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.