Re: SQL connection timeout -- is it pretty useless or what?



I was looking it going thru SQL instances but realized that will only work
with local networks.

It seems to me that building in this timeout to permit "move wires around"
is building a solution (with an large negative impact) for a problem that
might happen .0001% of the time? Just about any shop I know, usually
provides "down time" for this activity, so why introduce a 45 second
timeout. Does that make sense to you?

So what is the point of having a TimeOut property? I set it to 90 seconds
and it timed out in 130 seconds, I set it to 2 seconds and it timed out in
45 seconds, I set it to 60 seconds and it timed out in 120 seconds -- just
seems to be to random and very useless to me?

Any way to quick test for a response (with a timeout) from an IP address and
SQL listening port -- hackers seem to be able to do it so it must be pretty
easy.

Rob.

"William (Bill) Vaughn" <billvaRemoveThis@xxxxxxxxxx> wrote in message
news:eM2c9lgoGHA.4996@xxxxxxxxxxxxxxxxxxxxxxx
The issue is usually that the timeout counter does not start until network
connectivity has been established. If the NIC card can't see the wire,
it's programmed to wait for quite some time before complaining. This is by
design and due to the way the TCP protocol works--it permits you to move
wires around or use a switch/router/hub without worrying that it will
disturb the network. We've talked about this issue for decades--there is
no easy way to resolve it.

hth

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

"Rob R. Ainscough" <robains@xxxxxxxxxxx> wrote in message
news:Of95s0foGHA.2464@xxxxxxxxxxxxxxxxxxxxxxx
I'm trying to code a routine that will test the connection to a server
and I would like to specific how long (aka timeout) the .Open() should
wait before a timeout error is triggered.

I've tried "connection timeout=10;" in the connect string, but that still
doesn't timeout til 30 seconds have passed. I can't set the
Connection.ConnectionTimeout as that is a read only property. So am I
out of luck? Is there no way to quickly test a SQL connection in .NET
2.0? Operative being quickly as in I can define how long to wait?

Please tell me I don't have to initiate a thread for the SQL connection
and have the thread stop after xx seconds. There must be a more simple
approach no?? VS 2005 is supposed to be RAD (rapid application
development) not WAAD (work around application development).

Thanks, Rob.






.



Relevant Pages

  • Timeout expired error executing a simple View in SQL Server 2005 Express SP2
    ... and hitting problems executing simple Views executed from SSQL Server ... Next we started to create Views with various filter criteria to assess ... SQL Execution Error. ... The timeout period elapsed prior to ...
    (microsoft.public.sqlserver.connect)
  • Re: best practices to support multi-users
    ... > have a client application installed on several machines which access a sql ... > period it gives an error saying timeout expired. ... and you then interpret the timeout to mean that ... there was contention. ...
    (microsoft.public.vb.database.ado)
  • Re: Simple timeout problem
    ... Brian, I haven't found anything specific on this error. ... We'd want to limit the trace to just the BizTalkRuleEngineDB. ... To run a trace go to SQL Profiler (under the SQL Server entry in the start ... | are reporting a timeout condition trying to connect to the SQL database. ...
    (microsoft.public.biztalk.general)
  • Re: timeout expired on View
    ... Error Message: Timeout expired. ... SQL Server Driver]Timeout ...
    (microsoft.public.sqlserver.tools)
  • Re: general network error
    ... Maybe it's the SQL statement that is timing out. ... > System.Data.SqlClient.SqlException: Timeout expired. ... > cmdBehavior, RunBehavior runBehavior, Boolean returnStream) ... > System.Data.SqlClient.SqlException: General network error. ...
    (comp.databases.ms-sqlserver)

Loading