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

Home -> Community -> Mailing Lists -> Oracle-L -> FW: ADO.NET and Oracle 8.1.6

FW: ADO.NET and Oracle 8.1.6

From: Jacques Kilchoer <Jacques.Kilchoer_at_quest.com>
Date: Wed, 24 Oct 2001 11:02:58 -0700
Message-ID: <F001.003B37A0.20011024112203@fatcity.com>

(p.s. tday6 - please ignore my previous message, I hit the send button too quickly.)

> -----Original Message-----
> From: tday6_at_csc.com [mailto:tday6_at_csc.com]
> > Are the ODBC driver and SQL*Plus using the same tnsnames.ora file?
> Yes, as far as I can see.  I'm not sure where the MS driver
> gets its path
> to the TNSNAMES.ORA.  We were able to connect using an
> earlier version of
> ADO.
Errors of the kind you describe (able to connect with SQL*Plus but not another client) often resolve to misspelling of the alias or the use of a different tnsnames.ora file, in my experience.

Search for the tnsnames.ora and sqlnet.ora files follows the following steps IIRC:

a) look in current directory
b) look in directory specified by TNS_ADMIN environment variable (if that variable is set)
c) look in %ORACLE_HOME%/network/admin


I would do a search on the client machine to find all tnsnames.ora files. In a multiple Oracle homes situation, I usually set the TNS_ADMIN environment variable and have the tnsnames.ora file in only one location (or, if you don't want to set the TNS_ADMIN environment variable, have one tnsnames.ora file for each oracle_home, and use the "ifile=" option to include the entries from another "centralized" file - make sure the ifile parameter includes the full path to your "centralized" file.)

In any case, try and reduce the number of tnsnames.ora files you have on the client, as much as possible.

Once you do that, make sure you can connect from SQL*Plus with username/password_at_tns_alias

Then try ODBC. If ODBC fails, check the ODBC DNS entry. If it still fails, turn on Net8 tracing in the sqlnet.ora configuaration file (sqlnet.ora will be in the same directory as tnsnames.ora):

trace_directory_client = c:\mydir
trace_file_client = my_file
trace_level_client = admin  (can be one of off, user, admin, support)


Try the ODBC connection, then turn off tracing (otherwise the trace file will become huge) and go look in it for any errors. The trace file will have a lot of information, but you can at least use it to see if Net8 found your tnsnames.ora file, and what entry it grabbed from the tnsnames.ora file. Received on Wed Oct 24 2001 - 13:02:58 CDT

Original text of this message

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