DAAB-Connection Timeout Settings+ PerformenceCounters

Topics: Data Access Application Block
Dec 12, 2008 at 9:27 PM

We are currently using EntLib 4.0. 

I was wonderting if there is any setting through which I can control connection timeout of connectoin in the pool?? ( I read online and tried "ConnectonTimeout" in connection string which does not seems be correct)

I was aslo looking in to performence counters. Since DataAccessApplication Block used System.Data.OracleClient internally to connect to Database, my assumption is that ".,Net Data provider for Oracle" performence counter should reflect the correct values. I tried to see locate information about any instrumentation provided DAAB, I was not very successfull with it.

I would appriciate if you can share your expertise over this to point me in the right direction...


Dec 14, 2008 at 6:12 AM
Did you used ConnectionTimeOut?  It should be Connection TimeOut.  Regarding the performance counters, make sure you run the InstallServices.bat file and you enable instrumentation in your application.  Check out Enabling Instrumentation section of the documentation.

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.

Dec 15, 2008 at 3:30 PM
Thank you for your response..

I am trying to connect to Oracle 11 server. I tried adding "Connection TimeOut"  as mentiond. Here is the error message that is returned ( I tried "Connect Timeout" as well)

"Keyword not supported: 'connection timeout'."

Here is the connection string


add name="OracleServer" connectionString="DATA SOURCE=DB;PERSIST SECURITY INFO=False;USER ID=XXX;Password=XXX;Connection Lifetime= 60;Max Pool Size= 4;Connection Timeout=30;" providerName="System.Data.OracleClient"/>


I will go through documentation and follow instructions in it for enabling instrumentation.
Dec 15, 2008 at 4:00 PM
I don't know if it's case-sensitive but try Connection Timeout ( you said you tried Connect Timeout). That's what's given in the sample here, http://www.connectionstrings.com/oracle

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.

Dec 15, 2008 at 5:36 PM
Edited Dec 15, 2008 at 5:37 PM
Removed: not useful
Dec 15, 2008 at 8:14 PM
Thank your for your response...

I did use "Connection Timeout " ( as in the connection string pasted in the last post), but error comes up with lower case letters as "connection timeout"
I would appriciate if you could point me in the right direction..

I tried enabling instrumention. This is what I have done ( I thought it might of help for those who will be referring this post)

We need to run InstallServices script to enable services ( please note that these needs to run against the location in which enterprise library dlls which are used by your application are stored)

Next We just need to set few flags in config file to enable instrumentation

Dec 16, 2008 at 2:09 AM
Hi, I just found this http://msdn.microsoft.com/en-us/library/system.data.oracleclient.oracleconnection.connectiontimeout.aspx

"Unlike the Connection object in the other .NET Framework data providers (SQL Server, OLE DB, and ODBC), OracleConnection does not support a ConnectionTimeout property. Setting a connection time-out either with a property or in the connection string has no effect, and the value returned is always zero. OracleConnection also does not support a Database property or a ChangeDatabase method. "

Sorry for the previous posts, I haven't worked with an Oracle database yet.

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.