August 7, 2012 at 9:33 am
Hi all,
Is there a way to set timeout in openrowset? My project requires to connect from a sql server 2005 server to 150 databases (sql server 2000) and run some query there. Some connections may be broken. The broken connection may take 40s to timeout, the query only runs about 2 seconds. So I want to set a timeout in openrowset so the overall run time can be reduced.
Thanks.
August 8, 2012 at 2:09 am
so there is no way?
August 8, 2012 at 9:19 am
It seems trying to add timeout in openrowset is not doable. The workaround is to try to ping to the server use xp cmdshell 'ping -n 2 -w 3000 ip' , -n means number of retries (default is 4), -w means timeout for each try (default may be 4 seconds).
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy