Oracle .NET provider(s) - setting connection and query timeouts ...

  • Thread starter Thread starter Darta
  • Start date Start date
D

Darta

We are in a great need to be able to set connection and query timeouts
on our stored procedures when called from MW. We use Oracle 8.1.7.4
on the server and currently use MSDAORA for database access
(VB6-COM+), which has above limitation as per 251248. We are
converting to .NET/C#. Does anyone know if the new Microsoft .NET
Oracle Managed provider support this feature? Does Oracle OLE DB .NET
provider support it? Does any other 3rd party have ability to set the
timeout values on connection and query execution ....? I am hoping I
will not have to resort to the background service/thread that will
count the time after X secs just to get this to work...

Any help would be greatly appreciated.

Tigger
 
Darta,
Like Marina says there is a Connection Timeout connection string keyword and
a CommandTimeout property in the command. It is important that you realize
that both of these values are of the type: "timeout equals to _at least_
<your timeout>". When you specify the timeout value we guarantee that we
will not time out untill that value is reached, we do not guarantee that we
will timeout at exactly the timeout value specifed. What really happens is
that we will timeout as soon as we realize that the timeout has expired, for
example:

loop start
check timeout, if expired exit
do x (x seconds)
loop end

So if your timeout happens while doing x we will not timeout until x
finishes and we go back to the begining of the loop, we do not have a
timeout thread that kicks in at the exact timeout value and cancels
everything.
 
OK- sounds good. Let me know for below.

What threw me off was this post (I haven't tried it myself, and this
was posted in 2001):


From: Peter Meinl ([email protected])
Subject: Re: Whats is the time out period if the client looses
connection with DataBase during Fill method
View this article only
Newsgroups: microsoft.public.dotnet.framework.adonet
Date: 2001-07-24 11:26:29 PST


I had similar problems wie ADO (not .NET) and Oracle and we never were
able
to solve them ;-(


Naveen K Kohli said:
Yes there is.... But like many other features it is useless.... It does not
matter what value you set. The method never returns if the connection is
lost.
I tried setting it to 30. But i waited for ever :-)

Naveen






Angel Saenz-Badillos said:
Darta,
Like Marina says there is a Connection Timeout connection string keyword and
a CommandTimeout property in the command. It is important that you realize
that both of these values are of the type: "timeout equals to _at least_
<your timeout>". When you specify the timeout value we guarantee that we
will not time out untill that value is reached, we do not guarantee that we
will timeout at exactly the timeout value specifed. What really happens is
that we will timeout as soon as we realize that the timeout has expired, for
example:

loop start
check timeout, if expired exit
do x (x seconds)
loop end

So if your timeout happens while doing x we will not timeout until x
finishes and we go back to the begining of the loop, we do not have a
timeout thread that kicks in at the exact timeout value and cancels
everything.

--
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.


Marina said:
The connection object should have a ConnectionTimeout property to control
the timeout for the connection. The command object should have a
CommandTimeout property to set the timeout for the execution of a command.
 
Hi- I did more research and this is what I found on MSDN...

-------------------------------------------------------------
http://msdn.microsoft.com/library/d...ataOracleClientOracleConnectionClassTopic.asp

"Note: 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 timeout
using a property or in the connection string has no effect and value
returned is always zero. OracleConnection also does not support a
Database property or a ChangeDatabase method."

http://msdn.microsoft.com/library/d...emDataOracleClientOracleCommandClassTopic.asp

"Note Unlike the Command object in the other .NET Framework data
providers (SQL Server, OLE DB, and ODBC), OracleCommand does not
support a CommandTimeout property. Setting a command timeout has no
effect and value returned is always zero."
-------------------------------------------------------------


Am I missing something- are you guys referring to some other .NET
rovider- not Oracle managed provider....? It states that even if you
set that property for the OracleConnection/OracleCommand object it is
not supported and it has no effect.... So it does exist but...

Let me know...

Thanks
Darta

Angel Saenz-Badillos said:
Darta,
Like Marina says there is a Connection Timeout connection string keyword and
a CommandTimeout property in the command. It is important that you realize
that both of these values are of the type: "timeout equals to _at least_
<your timeout>". When you specify the timeout value we guarantee that we
will not time out untill that value is reached, we do not guarantee that we
will timeout at exactly the timeout value specifed. What really happens is
that we will timeout as soon as we realize that the timeout has expired, for
example:

loop start
check timeout, if expired exit
do x (x seconds)
loop end

So if your timeout happens while doing x we will not timeout until x
finishes and we go back to the begining of the loop, we do not have a
timeout thread that kicks in at the exact timeout value and cancels
everything.

--
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.


Marina said:
The connection object should have a ConnectionTimeout property to control
the timeout for the connection. The command object should have a
CommandTimeout property to set the timeout for the execution of a command.
 
Darta,
I apologize, you are completelly correct. The connection and command
timeouts do not work with Oracle at all. The connection keyword is not even
allowed (fails to connect when set) and the command timeout value is
ignored.

--
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.


Darta said:
Hi- I did more research and this is what I found on MSDN...

-------------------------------------------------------------
http://msdn.microsoft.com/library/d...ataOracleClientOracleConnectionClassTopic.asp

"Note: 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 timeout
using a property or in the connection string has no effect and value
returned is always zero. OracleConnection also does not support a
Database property or a ChangeDatabase method."

http://msdn.microsoft.com/library/d...emDataOracleClientOracleCommandClassTopic.asp

"Note Unlike the Command object in the other .NET Framework data
providers (SQL Server, OLE DB, and ODBC), OracleCommand does not
support a CommandTimeout property. Setting a command timeout has no
effect and value returned is always zero."
-------------------------------------------------------------


Am I missing something- are you guys referring to some other .NET
rovider- not Oracle managed provider....? It states that even if you
set that property for the OracleConnection/OracleCommand object it is
not supported and it has no effect.... So it does exist but...

Let me know...

Thanks
Darta

"Angel Saenz-Badillos[MS]" <[email protected]> wrote in message
Darta,
Like Marina says there is a Connection Timeout connection string keyword and
a CommandTimeout property in the command. It is important that you realize
that both of these values are of the type: "timeout equals to _at least_
<your timeout>". When you specify the timeout value we guarantee that we
will not time out untill that value is reached, we do not guarantee that we
will timeout at exactly the timeout value specifed. What really happens is
that we will timeout as soon as we realize that the timeout has expired, for
example:

loop start
check timeout, if expired exit
do x (x seconds)
loop end

So if your timeout happens while doing x we will not timeout until x
finishes and we go back to the begining of the loop, we do not have a
timeout thread that kicks in at the exact timeout value and cancels
everything.

--
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.


Marina said:
The connection object should have a ConnectionTimeout property to control
the timeout for the connection. The command object should have a
CommandTimeout property to set the timeout for the execution of a command.

We are in a great need to be able to set connection and query timeouts
on our stored procedures when called from MW. We use Oracle 8.1.7.4
on the server and currently use MSDAORA for database access
(VB6-COM+), which has above limitation as per 251248. We are
converting to .NET/C#. Does anyone know if the new Microsoft .NET
Oracle Managed provider support this feature? Does Oracle OLE DB ..NET
provider support it? Does any other 3rd party have ability to set the
timeout values on connection and query execution ....? I am hoping I
will not have to resort to the background service/thread that will
count the time after X secs just to get this to work...

Any help would be greatly appreciated.

Tigger
 
Back
Top