Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
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
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 ?
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:
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