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: ORA-12154 Error using ODBC on Win2k

Re: ORA-12154 Error using ODBC on Win2k

From: Randy Harris <randy_at_SpamFree.com>
Date: Fri, 16 Apr 2004 23:54:57 GMT
Message-ID: <ln_fc.20$wW5.9@newssvr15.news.prodigy.com>

"Warren Wright" <warren.wright_at_us.scorex.com> wrote in message news:8497c269.0404160552.750ed1e2_at_posting.google.com...
> Thanks Randy. I just tried this, and found that I still get the same
> error message. Further, if I modify my client code to include
> "DBQ=CSDWORLD" or "DBQ=CSDWORLD.ena.us.exeperian.local" it has no
> effect.
>
> Obviously the tns entry is effective, as when I test it from the ODBC
> setup in Administrative Tools for Win2k I successfully connect to the
> server, and can see in the network/log/listener.log (on the server)
> where it has connected.
>
> Do I need a listener of any kind on the client machine to help my C++
> application find the local tns entry when it uses ODBC?

I'm quite surprised that did not help. There should be no need for a listener on the client system, the listener is used only on the server. The fact that you can get to the DB with SQL*Plus confirms that the listener is functional on the server. The listener is the "facilitator". It listens for incoming service requests and provides connection ID information for a server service to the client.

The specific error message that you are getting is usually quite telling of the problem - "TNS:could not resolve service name". The service name is that first line in the tnsnames.ora file. For some reason that I am at a loss to explain, your client is not finding that entry. I can think of only two other possible explanations. Either the client app isn't really using CSDWORLD as the service name or it isn't using that particular tnsnames.ora to resolve the service name.

Check the client system to make sure you don't have an environment variable that starts with TNS, such as TNS_ADMIN_DIR, or one called TWO_TASK or one called LOCAL. Also do a find on the entire system to see if there might be another tnsnames.ora file somewhere. I've seen that cause problems when there has been more than one version of Oracle installed on a system.

Randy

> It just seems like everything is already set up as it logically should
> work, but then again I'm fairly new to Oracle, so any advice is
> appreciated.
>
> Regards,
>
> Warren Wright
> Dallas
>
> "Randy Harris" <randy_at_SpamFree.com> wrote in message
news:<uCFfc.2$mh1.1_at_newssvr16.news.prodigy.com>...
> > It's very likely that your client is not adding the domain name to your
net
> > service alias. Create another entry in your client tnsnames.ora,
exactly
> > like the one above, but with only "CSDWORLD =" on the first line. Like
> > this:
> >
> > CSDWORLD =
> > (DESCRIPTION =
> > (ADDRESS_LIST =
> > (ADDRESS = (PROTOCOL = TCP)(HOST = w4533071)(PORT = 1521))
> > )
> > (CONNECT_DATA =
> > (SERVICE_NAME = csdworld)
> > )
> > )
> >
> > HTH,
> > Randy
Received on Fri Apr 16 2004 - 18:54:57 CDT

Original text of this message

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