From: "Jim Kennedy" jim dot scuba dot kennedy at gee male dot on 27 Sep 2006 08:15 "CJM" <cjmnews04(a)REMOVEMEyahoo.co.uk> wrote in message news:4nsvg3Fc1fl2U1(a)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(a)ifsp2 ? If not then solve that problem first. Jim
From: CJM on 27 Sep 2006 10:03 "Jim Kennedy" <jim dot scuba dot kennedy at gee male dot com> wrote in message news:HbSdnRU9PqB994fYnZ2dnUVZ_oydnZ2d(a)comcast.com... > > Can you connect from that machine via sqlplus using uid/pwd(a)ifsp2 ? If > not > then solve that problem first. > Jim > I haven't tried SQLPlus yet (not really up to speed on it) but I can TNSPING the DB and the same page also connects via ADO (using the same TNS names) so they appear to be configured correctly. As I've just mentioned to Brian, I think I may have made some progress, so I'll review my position if/when I confirm this. CJM
|
Pages: 1 Prev: runtime error on scripting.filesystemobject Next: Display PDF from database without caching |