Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> ORA-12154 Error using ODBC on Win2k
Please help point me in the right direction.
I am trying to SQLDriverConnect to our Oracle Server, which resides on another machine in the network.
I believe I have the ODBC connection set up correctly, as clicking "Test Connection" and then entering a valid username/password connects successfully.
Here is the tnsnames.ora file from my client machine:
CSDWORLD.ENA.US.EXPERIAN.LOCAL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = w4533071)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = csdworld)
)
)
As you can see, the remote host is w4533071, which I can ping, etc from my box, and I can connect to that remote database using the various Oracle tools like SQL Plus or Enterprise Manager Console.
Here is the relevant ODBC trace section:
SRV40 98c-588 ENTER SQLDriverConnectW HDBC 019D2188 HWND 00000000 WCHAR * 0x01997310 [ -3] "******\ 0" SWORD -3 WCHAR * 0x01997310 SWORD 8 SWORD * 0x00000000 UWORD 0 <SQL_DRIVER_NOPROMPT> SRV40 98c-588 EXIT SQLDriverConnectW with return code -1 (SQL_ERROR) HDBC 019D2188 HWND 00000000 WCHAR * 0x01997310 [ -3] "******\ 0" SWORD -3 WCHAR * 0x01997310 SWORD 8 SWORD * 0x00000000 UWORD 0 <SQL_DRIVER_NOPROMPT> DIAG [08004] [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolveservice name
DIAG [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed (0)
If it matters, my test application is written in Visual C++ 6.0, latest service pack.
Oracle version 9.2 (I believe).
Please get me started, and I look forward to trying your suggestions.
Regards,
Warren Wright
Dallas, TX
Received on Thu Apr 15 2004 - 18:14:28 CDT