Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Linked server timeout within a query

$
0
0
I know I can find out the status of a linked server using sp_testlinkedserver. However the query takes quite sometime until it returns "Login timeout expired". Is it possible to change the timeout for a linked server query without changing the overall timeout setting of the linked server? I don't need to wait a long time only to find out if the linked server is down, but if it is down, I need to wait as long as it takes for the linked server to return the data I requested. As far as I'm concerned, I could create a view on the remote server to return GETDATE() and use the view in a four-part query between a try/catch to identify if the linked server is up or down, and process data accordingly. However I cannot wait for the query to timeout at the linked server setting.

Viewing all articles
Browse latest Browse all 3145

Trending Articles