Note that there are some explanatory texts on larger screens.

plurals
  1. POOracle (0x80004005)ORA-12154: TNS:could not resolve the connect identifier
    text
    copied!<p>I'm trying to connect to an oracle db from an ASP classic application, however I keep running into the ORA-12154 error.</p> <ol> <li><p>TNSNAMES.ORA is configured properly</p> <p>DBSOURCE.A.B.com = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = C.D.B.com)(PORT = 1231)) ) (CONNECT_DATA = (SERVICE_NAME = DBSOURCE) ) )</p></li> <li><p>I can TNSPING</p> <p>C:\Documents and Settings\USERID.A>tnsping DBSOURCE</p> <p>TNS Ping Utility for 32-bit Windows: Version 10.2.0.4.0 - Production on 09-MAR-2 011 09:12:31</p> <p>Copyright (c) 1997, 2007, Oracle. All rights reserved.</p> <p>Used parameter files: C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN\sqlnet.ora</p> <p>Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = C.D.B.com)(PORT = 1231))) (CONNECT_DATA = (SERVIC E_NAME = DBSOURCE))) OK (30 msec)</p></li> <li><p>I can create an ODBC connection and I've tested the connection which is successful.</p></li> <li>I can connect to the oracle db through toad.</li> <li><p>I've checked my sqlnet.ora file</p> <p>NAMES.DEFAULT_DOMAIN = A.B.com</p> <p>SQLNET.AUTHENTICATION_SERVICES= (NONE)</p> <p>NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)</p></li> <li><p>I've also checked that the TNSNAMES.ORA as one of my system paths.</p></li> <li><p>I can connect to the DB with SQLPLUS</p></li> </ol> <p>Here is the code that throws the error</p> <pre><code>dim CnnStr Set Cnn = Server.CreateObject("ADODB.Connection") CnnStr="Provider=MSDAORA.1;Password=pass;User ID=user;Data Source=DBSOURCE" Cnn.Open CnnStr </code></pre> <p>I am running windows XP Pro 32bit SP3</p> <p>I've tested this on a co-workers machine and the asp app has no issues, am I missing a configuration somewhere or did I mess up my config?</p> <p>Thanks for the help everyone!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload