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: <asger.grunnet_at_gmail.com>
Date: 24 Sep 2006 13:39:14 -0700
Message-ID: <1159130354.074897.223750@h48g2000cwc.googlegroups.com>

Brian Peasland wrote:
> > 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. ;)

Thank you very much for answering!

I can try to use Oracle's driver, but I don't think it will make any difference -
mostly because the SQLs work fine when I send them using the desktop application (as opposed to the ASP.NET application). The desktop app uses
the exact same ODBC connection as the web application does.

Anyway, tomorrow I am going to visit the customers IT-department, so I have an opportunity to try some things myself, rather than having it done
by email - they do not allow any kind of remote access to their servers.
I will definitely try to change the ODBC driver. I would be surprised - but
also very happy - if that was all there was to it.

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

I will definitely try that as well. But if that was the problem, then I don't
understand how the first SQL sent by the application works ok, whereas the second one fails? That just doesn't make any sense to me.

Regards,
Asger Received on Sun Sep 24 2006 - 15:39:14 CDT

Original text of this message

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