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

Home -> Community -> Usenet -> c.d.o.misc -> odp.net OracleConnection.Open() fails silently.

odp.net OracleConnection.Open() fails silently.

From: <aliziad_at_gmail.com>
Date: 28 Feb 2007 13:41:21 -0800
Message-ID: <1172698881.031529.175830@t69g2000cwt.googlegroups.com>


Hello,

For some reason the Open() call does not cause a connection to be opened for me inside an ASP.NET service.

It also seems to fail without throwing an exception. Here is the connection string that I am using:

connStrBuilder["Data source"] = dbAcct.m_Instance;
connStrBuilder["User Id"] = dbAcct.m_Username;
connStrBuilder["Password"] = dbAcct.m_Password;
connStrBuilder["Min Pool Size"] = 10;
connStrBuilder["Connection Lifetime"] = 120;
connStrBuilder["Connection Timeout"] = 60;
connStrBuilder["Incr Pool Size"] = 5;
connStrBuilder["Decr Pool Size"] = 2;

I am using this inside an ASP.NET webservice running in IIS 6 on W2003 Server
(64bit OS and ODP.NET)



oconn = new OracleConnection(connStrBuilder.ConnectionString);

oconn.Open();
bRet = (oconn.State == ConnectionState.Open); if (bRet) LogMsg("Connected to database."); else {
LogMsg("Not Connected!");
throw(new Exception("NewSession(): Unable to obtain session - state = "
+oconn.State.ToString()+" / T.O:"+oconn.ConnectionTimeout)); }


This code gets called repeatedly for each request, I'd submit 10-20 at a time.

The logs show that the Open() function call does not throw an exception but an exception does get thrown by the throw() above documenting that the state of oconn connection is "Closed" and the timeout is set to 60 seconds.

Exception: [NewSession(): Unable to obtain session - state=Closed / T.O:60]

I'd greatly appreciate any insight into what's causing this behavior, not sure what I am missing here.

thanks,
-ali Received on Wed Feb 28 2007 - 15:41:21 CST

Original text of this message

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