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

Home -> Community -> Usenet -> c.d.o.server -> Re: tnsping fails, yet sqlplus connects

Re: tnsping fails, yet sqlplus connects

From: EdStevens <quetico_man_at_yahoo.com>
Date: 30 Jun 2006 05:39:28 -0700
Message-ID: <1151671168.339454.238810@y41g2000cwy.googlegroups.com>

Lars Tetzlaff wrote:
> EdStevens wrote:
> > C:\>tnsping epspd
> >
> > TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on
> > 29-JUN-2
> > 006 09:10:21
> >
> > Copyright (c) 1997, 2005, Oracle. All rights reserved.
> >
> > Used parameter files:
> >
> As the output shows, tnsping doesn't find or use any parameter file, so
> your entry in TNSNAMES isn't used.
> In Oracle 10 you can connect to a db without a tnsnames.ora (don't
> remember the name of the new connection method) with an URL-like name
> (//10.xxx.xxx.xxx/EPSPD in your case). sqlplus seems to
> try to add localhost to a name, whenever the name couldn't be resolved,
> tnsping doesn't!
>
> Lars

Actually, you've always been able to connect without a TNSNAMES file if you supply the entire connection string at the command line. Something like

sqlpus myuser@
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=cdnbwecp)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = emreppd)))

That may not be exactly right, but you get the idea. I actually tested this once and was surprised to find that it works.

Your observation of the lack of a parm file is interesting. I missed that. Is he referring to the sqlnet.ora file? If so, that could be the explanation, as that is where we get DEFAULT_DOMAIN, which is critical to properly parsing the connection spec. If that is it, I'm surprised that it doesn't get referenced with tnsping. I would have thought that comes further down the sqlnet stack and so wouldn't matter if your calling app was sqlplus, tnsping, or whatever. Received on Fri Jun 30 2006 - 07:39:28 CDT

Original text of this message

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