set timeout in openrowset?

  • 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.

  • so there is no way?

  • 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 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply