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 -> Bug Report: NT4.0 client SQL*Net problem

Bug Report: NT4.0 client SQL*Net problem

From: Steve Culy <sculy_at_boulder.vni.com>
Date: 1998/11/10
Message-ID: <36487CDC.5DD219E4@boulder.vni.com>#1/1

I posted about this a while ago. I have included the original text to provide detail about the bug.

For Oracle Client 7.3.2.2.0, there is a bug in the OCI drivers which run on
Windows NT. The OCI driver requires the default file mode (_fmode global variable on Windows NT) to be set to _O_TEXT. If your application has _fmode = _O_BINARY, then the OCI driver will not be able to read the TNSNAMES.ORA file, and you will get the following error:

ORA-12154: TNS:could not resolve service name.

The work-around is to save the original value of _fmode, set _fmode = _O_TEXT during the database connect, and restore the original value of _fmode after the connect is completed.

I don't know if this is fixed in a later version of Oracle Client or not. If anyone knows more info about this, I would appreciate hearing about it.

Thanks to everyone who responded about this bug!

--
----------------------
Steve Culy
Visual Numerics, Inc.
sculy_at_boulder.vni.com   voice:(303)245-5328


Steve Culy wrote:


> I'm having a very curious problem with SQL*Net 2.3
> when running from NT4.0 (Intel x86 client).
>
> It all started when we upgraded our client and server
> (HPUX) from Oracle 7.1.6 to 7.3.2. When our ODBC
> application runs on the client, we get the following error:
>
> ORA-12154: TNS:could not resolve service name.
>
> I know that this error usually means that I have botched
> the SQL*Net setup somehow. My next move was to
> use the ODBC test applications (both Microsoft and Oracle
> have them!) to debug the setup. To my surprise, both connected
> to the server with no problems. SQL*Plus also works from the
> NT client with no problem.
>
> So far, I've already tried the following steps to try to solve
> the problem:
>
> 1) I've turned on trace in the SQLNET.ORA file
> (trace_level_client=16). It generates a marvelous
> trace file for both of the ODBC test programs, and
> absolutely nothing when I run from ODBC.
>
> 2) I've checked that SQLNET.ORA and TNSNAMES.ORA
> are in the right place and have the right syntax. I generated
> them with SQL*Net Easy Configuration, but I get the same
> results whether I use the generated version, or if
> I edit a text version with NOTEPAD.
>
> 3) I've tried running TNSPING <server_name> to see if
> that would give me any information. I see a dump
> which indicates that it is finding the correct TNSNAMES.ORA
> file, but it tells me that the listener is not
> running (TNS-12541). I know that the listener is
> running, because I can still access it via ODBC test or
> SQL*Plus.
>
> 4) I've verified that ORACLE_HOME and TNS_ADMIN are defined
> both as Windows system variables and as NT Registry entries.
> I've tested each of the combinations (system variables alone,
> Registry entries alone, and both together).
>
> 5) I've gone as far as to remove all traces of the Oracle
> drivers (both OCI and ODBC, all versions) and re-install
> ONLY 7.3.2 (and ODBC 2.5) from scratch.
>
> I've looked over all of the documentation on the Oracle Tech
> Net site, and I've looked over 2 years worth of comp.database*.oracle.*
> entries to try to find an answer, but I can't find anything I haven't
> already tried. I would really appreciate any insite that anyone
> could give into this problem.
>
> Thanks,
>
> --
> ----------------------
> Steve Culy
> Visual Numerics, Inc.
> sculy_at_boulder.vni.com voice:(303)245-5328
Received on Tue Nov 10 1998 - 00:00:00 CST

Original text of this message

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