Showing posts with label property. Show all posts
Showing posts with label property. Show all posts

Monday, 19 March 2012

Connect timeout?

Hi all
I set the connection timeout property in my connection string but it dosen't
effect.
my connection time out in 30 sec..I set it to above 30
but it dosen't effect..
hi,
perspolis wrote:
> Hi all
> I set the connection timeout property in my connection string but it
> dosen't effect.
> my connection time out in 30 sec..I set it to above 30
> but it dosen't effect..
I usually get the required result(s)..
see http://www.connectionstrings.com/, "read more" frame,
Connect Timeout
-or-
Connection Timeout
, thus,
connection_string = "....;Connection Timeout = n;"
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.bizhttp://italy.mvps.org
DbaMgr2k ver 0.20.0 - DbaMgr ver 0.64.0 and further SQL Tools
-- remove DMO to reply
|||I know how can I use it..but it dosen't have any impact in connection
string..
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:4pukiiFkoabnU1@.individual.net...
> hi,
> perspolis wrote:
> I usually get the required result(s)..
> see http://www.connectionstrings.com/, "read more" frame,
> Connect Timeout
> -or-
> Connection Timeout
> , thus,
> connection_string = "....;Connection Timeout = n;"
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.bizhttp://italy.mvps.org
> DbaMgr2k ver 0.20.0 - DbaMgr ver 0.64.0 and further SQL Tools
> -- remove DMO to reply
>
|||hi,
perspolis wrote:
> I know how can I use it..but it dosen't have any impact in connection
> string..
have you read Stefan Berglund answer in other ng?
(BTW, please do not multipost, crosspost instead, if pertinent and required
:D)
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.bizhttp://italy.mvps.org
DbaMgr2k ver 0.20.0 - DbaMgr ver 0.64.0 and further SQL Tools
-- remove DMO to reply

Connect Timeout will not work - SQLOLEDB

It seams as if the Connect Timeout property is not working correctly if the server that one is trying to connect to is down. This is my connection string.

Provider=SQLOLEDB;Pooling=False;Data Source=172.16.136.4;Initial Catalog=Db1;User ID=test;Password=test;Connect Timeout=5;

The timeout is ignored and the connection times out after about 15/20 seconds?

Any ideas?my guess is that your seeing the network connection timeout, not the sql connection timeout...

i.e.

before you can establish a sql connection, you need to establish a network connection|||Yes this seams to be correct , I am now working on a way of checking that the network connection is avaible before issuing a connection. Looking at using some ping routine, Will update this thread with the results