Re: Increase Connection\ Command timeout globally
- From: "William \(Bill\) Vaughn" <billvaRemoveThis@xxxxxxxxx>
- Date: Thu, 5 Apr 2007 13:01:46 -0700
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
.
- References:
- Re: Increase Connection\ Command timeout globally
- From: William \(Bill\) Vaughn
- Re: Increase Connection\ Command timeout globally
- Prev by Date: Re: Increase Connection\ Command timeout globally
- Next by Date: Re: adding a column to a table
- Previous by thread: Re: Increase Connection\ Command timeout globally
- Next by thread: RE: Increase Connection\ Command timeout globally
- Index(es):
Relevant Pages
|
Loading