Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: [Oracle 10g 10.1.0.2] TNS:listener does not currently know of service requested in connect

Re: [Oracle 10g 10.1.0.2] TNS:listener does not currently know of service requested in connect

From: HansF <News.Hans_at_telus.net>
Date: Sat, 30 Jul 2005 16:25:32 GMT
Message-Id: <pan.2005.07.30.16.29.12.793892@telus.net>


On Sat, 30 Jul 2005 16:50:53 +0200, mike henkins interested us by writing:

> Thanks, it works if I use sqlplus scott/tiger_at_cambridg it works but if you
> check
> http://forums.oracle.com/forums/thread.jspa?forumID=220&messageID=960520&thr
> eadID=303267
> you will see that it seems to be a problem with oracle 10g.
>
>
> However i am connecting through jdbc:
>
> conn = DriverManager.getConnection ("jdbc:oracle:thin:@" + server + ":" +
> port + ":" + base, user, pwd);
>
> that is why i want to get the sqlplus connection under DOS working.
>
> I need the localhost + port as well.
>
> Unless there is another getConnection method that only takes user, pwd and
> base ?

  1. Please, PLEASE do not top post.
  2. Realize that the JDBC Thin driver does NOT use the TNSNAMES entry at all, and therefore will not respond the same way as sqlplus.

sqlplus MUST use the {sqlnet, net8, Oracle networking} substrate and therefore refers to TNSNAMES.

The JDBC thin driver is self-contained, and uses the server/port combination to literally download the appropriate portion of the Oracle Networking (TTC) at run time.

You might want to spend some additional time with the "OracleŽ Database JDBC Developer's Guide and Reference" manual to get this a little clearer, from which I quote:



The JDBC Thin driver allows a direct connection to the database by providing an implementation of SQL*Net and TTC (the wire protocol used by OCI) on top of Java sockets. Both of these protocols are lightweight implementation versions of their counterparts on the server. The Thin driver runs over TCP/IP only.

Your attempt to use JDBC Thin protocol access with SQLPlus is totally incorrect.

-- 
Hans Forbrich                           
Canada-wide Oracle training and consulting
mailto: Fuzzy.GreyBeard_at_gmail.com   
*** I no longer assist with top-posted newsgroup queries ***
Received on Sat Jul 30 2005 - 11:25:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US