Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-12154 Error - TNS:could not resolve the connect identifier specified

Re: ORA-12154 Error - TNS:could not resolve the connect identifier specified

From: Jim Kennedy <jim>
Date: Wed, 27 Sep 2006 05:15:31 -0700
Message-ID: <HbSdnRU9PqB994fYnZ2dnUVZ_oydnZ2d@comcast.com>

"CJM" <cjmnews04_at_REMOVEMEyahoo.co.uk> wrote in message news:4nsvg3Fc1fl2U1_at_individual.net...
> I have a working web application (ASP) which links to an Oracle 10g DB via
> OO4O. I'm trying to port it to either of two test servers, but in fact, I
> can't get it to work with either - 'Unable to make connection, ORA-12154:
> TNS:could not resolve the connect identifier specified'. This error occurs
> in the applications global.asa file where I'm trying to set up a
connection
> pool:
>
> <object runat="Server" scope="Application" id="oSession"
> progid="OracleInProcServer.XOraSession"></object>
>
> <script runat="server" language="vbscript">
> Sub Application_OnStart
>
> oSession.CreateDatabasePool 2, 40, 200, "IFSP2", "uid/pwd", 0 <==
> error occurs here
>
> End Sub
> </script>
>
> I'm not sure where I have gone wrong. I originally installed the
> InstantClient (and ODBC add-on) on it's own. I created SQL.ORA and
> TNSNAMES.ORA files, and the NLS_LANG and TNS_ADMIN environment variables
and
> I prepended the Path environment variable with the path to the top-level
> oracle folder. So far so good - I can create a DSN which connects to the
DB
> OK, and Oracle SQL Developer recognised the TNS names I supply and can
> connect to the DB that way too.
>
> I then installed the Oracle .NET tools package, which includes within it
> Oracle Objects for OLE. The installation proceeded as expected, but short
of
> getting my application to work, I dont know of any way to confirm that it
is
> working.
>
> The application itself is using Anonymous authentication for the time
being,
> though it will eventually be using Integrated Windows Authentication, so I
> cant see the any problems server-side. What is more, I assume that OO4O is
> reading the TNS names in the same way that the ODBC Administrator and
Oracle
> SQL Developer do, which makes this problem even more curious.
>
> I've also tried the code listed below to see if a straight-forward
> connection (as opposed to pooling) would work but it didnt.
>
> Any thoughts?
>
> Thanks in advance.
>
> Chris
>
>
> Test.asp:
>
> <%@ Language=VBScript %>
> <%
>
> Option Explicit
> Response.Expires = 0
>
> Dim OraSession
> Dim OraDatabase
> Dim rsEntryTypes
>
> %>
> <!-- #include virtual='/common/oo4oglobals.asp' -->
> <%
>
> Set OraSession = Server.CreateObject("OracleInProcServer.XOraSession")
> Set OraDatabase = OraSession.DbOpenDatabase("IFSP2", "uid/pwd",cint(0))
>
> Response.Write "Connected to " & OraDatabase.Connect & "@" &
> OraDatabase.DatabaseName
> Response.Write "OO4O Version: " & OraSession.OIPVersionNumber
> Response.Write "Oracle Version: " & OraDatabase.RDBMSVersion
>
> Response.Write "End"
> Set OraSession = nothing
> Set OraDatabase = nothing
> %>
>
>

Can you connect from that machine via sqlplus using uid/pwd_at_ifsp2 ? If not then solve that problem first.
Jim Received on Wed Sep 27 2006 - 07:15:31 CDT

Original text of this message

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