Oracle Connection Time out

  • Thread starter Thread starter V.Balaji
  • Start date Start date
http://www.winnetmag.com/SQLServer/Article/ArticleID/24023/24023.html

Connection Lifetime in the connection string is the first place to look at.
The values can also be set on the Oracle Client, which is used by
OracleClient to connection. This may be a better option, depending on your
application.

An even better option is the ODP.NET provider from Oracle (otn.oracle.com),
which is more finely tuned to Oracle than the OracleClient namespace. There
are some minor differences from ADO.NET providers, but most of the model
matches up.


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Hi Beamer,

I am giving below the code, which we use to create connection

'******************************************
Private pvt_objOraConn As OracleConnection
Dim pvt_ObjConnectionString As String

pvt_ObjConnectionString="UID=sa;pwd=sa;Data Source=Customers;Connection
LifeTime=60"

pvt_objOraConn = New OracleConnection(pvt_ObjConnectionString)
pvt_objOraConn.Open()
'******************************************

I am unsure how to specify the connection timeout in the connection string.

Please help me out in this

Thanks and Regards,

V.Balaji
 
Balaji,
Connection Lifetime does not affect timeout or how long the connection
remains unused in the pool. I would strongly recommend not using it at all
unless you are using a failover cluster configuration. See my blog on this
for more info:
http://weblogs.asp.net/angelsb/archive/2004/09/20/231963.aspx

Oracle OCI does not have an api that allows us to pass in a connection
timeout value, if there is a way to specify this in a different way I am not
aware of it. Make sure to post in this thread if you find out!

Hope this helps,
--
Angel Saenz-Badillos [MS] Managed Providers
This posting is provided "AS IS", with no warranties, and confers no
rights.Please do not send email directly to this alias.
This alias is for newsgroup purposes only.
I am now blogging about ADO.NET: http://weblogs.asp.net/angelsb/
 
Back
Top