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: Strange ODBC error

Re: Strange ODBC error

From: Brian Peasland <dba_at_nospam.peasland.net>
Date: Fri, 22 Sep 2006 13:05:21 GMT
Message-ID: <J5zwDB.49z@igsrsparc2.er.usgs.gov>


> ERROR [08001] [Microsoft][ODBC driver for Oracle][Oracle]ORA-12154:
> TNS:could not resolve service name
> ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
> SQLSetConnectAttr failed
>
> I have googled for this error, and it seems to be a very common Oracle
> problem - usually caused by a missing clause in the tnsnames.ora file.
> I don't think the tnsnames.ora file has anything to do with the error I
> experience, though. Mostly because the error does not occur the first
> time the application accesses the database. The first SQL I send seems
> to work fine - at least it does not result in an error - but the second
> SQL returns the error above (both are very simple SELECT statements).

First, please use Oracle's ODBC driver. Microsoft's ODBC driver is very flaky when it comes to actually connecting and interacting with an Oracle database. I think Microsoft created this driver for the sole purpose of getting customers to use SQL Server instead, but I have no proof. ;)

Second, you will have to put the "missing clause" in your tnsnames.ora configuration file.

HTH,
Brian

-- 
===================================================================

Brian Peasland
dba_at_nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown
Received on Fri Sep 22 2006 - 08:05:21 CDT

Original text of this message

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