0

As I'm working on a new web application project in visual studio 2003, my application has queries which is being executed. This application is connected to a DB of type Oracle.

Now, what I want to do is to set the query time out value for all queries in this application to be very large value, or infinity, so when executing a query fails, it will not directly re executing it, because if it is executing it many times, and keeps executing it, the DB overload !

We noticed that around 60 sessions are opened and executing this query at the same time, if it fails to execute!

Now, my questions:

  1. Since I'm new to oracle, Where to find the query time out variable and change it to a very large value? And what about if I have many queries in my application? Do I need to change the time out value for each single query?

  2. I want to know the difference between HTTP/SOAP time out value and the query time out value?

Thank you guys !


I search to use CommandTimeout property which is in the OracleCommand Class, but I don't find it. Are there other ways to use this property to set timeout?

  • For the first question mb: http://stackoverflow.com/questions/1388749/oracle-connection-query-timeout?rq=1 – DatRid Jul 09 '14 at 09:03
  • Thank you! Yes I viewed this link, anyway this method (setQueryTimout) is supported in JAVA, I found similar property in the C# (CommandTimeout). Actually what is strange is that I cannot invoke this property in c# all the time! sometimes this property cannot be seen from the OracleCommand class – FloweryCoder Jul 10 '14 at 10:16

1 Answers1

0

In the Oracle database there is no default query timeout value, but we can do such a thing using resource manager, where a query can be cancelled when the estimation is made that the query takes more than X time. It would be good to use this to protect the database server from rogue queries that no one will be waiting for. This is about the opposite of setting the timeout to unlimited and in the end makes sure that the correct working app parts are not hindered by the bad parts.

See Managing Resources with Oracle Database Resource Manager is you really want to protect your users from bad performant applications.

Most likely, an earlier timeout comes at the web tier.