Re: Increase Connection\ Command timeout globally

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Ah, when my car's engine starts to overheat I don't start looking for ways
to add a bigger radiator, I look for a blown head gasket, a broken water
hose, better gas or reducing the load.

I suggest that you need to start working through your SPs and see why they
are running slowly. I discuss a number of these techniques in my book and
there are several other good sources of information in this regard. For
example if you have a complex SP, the query plan might not be optimal.
Simply breaking up the SP into several, more focused SPs that are called by
a "director" SP might make sense. Let the Query Analyzer test to see if you
need more (or fewer) indexes, make sure that the SQL server is not held back
by lack of RAM or queries that flush the cache or sharing CPU time with
Reporting Services or a print server.


--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

"sameer" <sameer@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:05034561-E13C-408E-AF7D-81E49ADFDF93@xxxxxxxxxxxxxxxx
Bill , thanks for your suggestion, database is growning and also lot of
logic
in Stored procs which is causing it to timeout. So are you sure that there
is
not was i can define the default timeout of a command object in ay
configuration file like either app.config or web. config so that ado.net
can
read it automatically and apply it ?

thanks

"William (Bill) Vaughn" wrote:

Ah, this is not a function of any SP code or anything done on the server.
Connection and Command timeout settings are done on the client. If you
are
creating individual Connection objects for each open, I suggest using a
common Connection string that has the desired Connection timeout value.
For
the Command objects, I suggest using a global variable to set the value,
but
I expect you'll have to visit each Command object declaration and set the
timeout property.

My next question is why do you think this is necessary?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no
rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

"sameer" <sameer@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:032945DE-CACB-444A-9523-123AFEECA9E2@xxxxxxxxxxxxxxxx
environment : .net framework 1.1, ado.net, visual studio 2003, vb,
sqlsever
2000, winforms, webforms

I want to increase the connection and command time out for all stored
procs
in the application which might be around 200 or more and this woudl
take
me
forever if i do it indivisually, is there any way i can increase the
ado.net
command timeout and connection timeout globally?

thanks
sameer





.



Relevant Pages

  • Re: Check Linked Table Connection
    ... That will only test to make sure the connection is available. ... Run the query with a 20 second timeout. ... but I don't have any direct access to their SQL Server nor their ... I am an outside programmer that end-users contract, ...
    (comp.databases.ms-access)
  • Re: First connection from Vista client to SQL Server 2005 times out
    ... I think we have the timeout set to 30 seconds.The same ... I have found that SQL Server Management ... Times out on the first connection attempt, ... manifest, it works fine with no other changes. ...
    (microsoft.public.data.ado)
  • Re: Increase Connection Command timeout globally
    ... "sameer" wrote in message ... in Stored procs which is causing it to timeout. ... Connection and Command timeout settings are done on the client. ... I expect you'll have to visit each Command object declaration and set the ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Timeout
    ... timeout for every SqlCommand (I don't know which one the user will use as the ... QUERY timeout problem--not one associated with a connection. ... database increases in size the system takes more time. ... Hitchhiker's Guide to Visual Studio and SQL Server ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: ODBC timeout when xp_cmdshell execute a long script
    ... I have this problem that seems to be related to ODBC connection ... mainly by setting the connection object's timeout value to 0 ... I have an ASP page connecting to a SQL server retrieving data via a single ... Here's the snippet of my ASP ... ...
    (microsoft.public.sqlserver.programming)