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="Applicat ion" id="oSession"
progid="OracleI nProcServer.XOr aSession"></object>
<script runat="server" language="vbscr ipt">
Sub Application_OnS tart
oSession.Create DatabasePool 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=VBScri pt %>
<%
Option Explicit
Response.Expire s = 0
Dim OraSession
Dim OraDatabase
Dim rsEntryTypes
%>
<!-- #include virtual='/common/oo4oglobals.asp ' -->
<%
Set OraSession = Server.CreateOb ject("OracleInP rocServer.XOraS ession")
Set OraDatabase = OraSession.DbOp enDatabase("IFS P2", "uid/pwd",cint(0))
Response.Write "Connected to " & OraDatabase.Con nect & "@" &
OraDatabase.Dat abaseName
Response.Write "OO4O Version: " & OraSession.OIPV ersionNumber
Response.Write "Oracle Version: " & OraDatabase.RDB MSVersion
Response.Write "End"
Set OraSession = nothing
Set OraDatabase = nothing
%>
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="Applicat ion" id="oSession"
progid="OracleI nProcServer.XOr aSession"></object>
<script runat="server" language="vbscr ipt">
Sub Application_OnS tart
oSession.Create DatabasePool 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=VBScri pt %>
<%
Option Explicit
Response.Expire s = 0
Dim OraSession
Dim OraDatabase
Dim rsEntryTypes
%>
<!-- #include virtual='/common/oo4oglobals.asp ' -->
<%
Set OraSession = Server.CreateOb ject("OracleInP rocServer.XOraS ession")
Set OraDatabase = OraSession.DbOp enDatabase("IFS P2", "uid/pwd",cint(0))
Response.Write "Connected to " & OraDatabase.Con nect & "@" &
OraDatabase.Dat abaseName
Response.Write "OO4O Version: " & OraSession.OIPV ersionNumber
Response.Write "Oracle Version: " & OraDatabase.RDB MSVersion
Response.Write "End"
Set OraSession = nothing
Set OraDatabase = nothing
%>
Comment