This discussion is archived
0 Replies Latest reply: May 30, 2008 10:02 AM by 63759 RSS

ODBC error ORA-12154

63759 Newbie
Currently Being Moderated
ODBC error ORA-12154

On my Windows XP Pro desktop, I have been using a DSN configured using Oracle ODBC Driver 8.00.58.00 to connect to a 9i database for a few years. Suddenly, I started getting "Ora-12154 TNS:could not resolve service name". In fact, all of my Oracle DSN's now fail, same error. Some use Oracle driver 9.02.00.00, so the issue is not any specific driver. I have multiple Oracle homes on my machine and each has the same tnsnames.ora and sqlnet.ora files; none of these have been changed, and no Oracle software has been added to my machine. SQL*Plus and other third-party products can all connect to the databases that odbc fails to connect.

The 12154 error is very specific and I know this sounds like straight-forward fix, but I cannot get around the error.

Looking at the following excerpt of an odbc trace, it appears that the problem occurs in the call to SQLDriverConnectW; but I cannot determine where the driver is looking for alias resolution.

Anyone know how to determine where the driver is looking? Perhaps other advice?

Thanx.


Here's the ODBC trace:
Request Managem 14b8-1538 ENTER SQLSetConnectAttrW
SQLHDBC 08D718D8
SQLINTEGER 103 <SQL_ATTR_LOGIN_TIMEOUT>
SQLPOINTER 0x0000000F
SQLINTEGER -6

Request Managem 14b8-1538 EXIT SQLSetConnectAttrW with return code 0 (SQL_SUCCESS)
SQLHDBC 08D718D8
SQLINTEGER 103 <SQL_ATTR_LOGIN_TIMEOUT>
SQLPOINTER 0x0000000F (BADMEM)
SQLINTEGER -6

Request Managem 14b8-1538 ENTER SQLDriverConnectW
HDBC 08D718D8
HWND 00000000
WCHAR * 0x74329A38 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x74329A38
SWORD 2
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>

Request Managem 14b8-1538 EXIT SQLDriverConnectW with return code -1 (SQL_ERROR)
HDBC 08D718D8
HWND 00000000
WCHAR * 0x74329A38 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x74329A38
SWORD 2
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>

DIAG [08001] [Microsoft][ODBC driver for Oracle][Oracle]ORA-12154: TNS:could not resolve service name (12154)

DIAG [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed (0)