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?

1 Answer 1


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.
  • Using SID instead of SERVICE_NAME worked, thank you! Feb 22, 2011 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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