How to avoid Query Timed Out error, while query can take indefinite and long time

  • While running a query on a linked server, I am getting a Query Timed Out error after few minutes. My query can take indefinite and long time. What should I do to fix the problem?

    Any Help could be Appreciated.

  • This could sound like a silly reply, but, what about optimizing the query so that it runs faster on the linked server?

    Are you running the query with OPENQUERY / EXECUTE AT or is it a plain 4-part-names query?

    Can you post the code here so that we can help further?

    Regards

    Gianluca

    -- Gianluca Sartori

  • There is no query time out in sql server ...

    it is a performance issue..

  • In remote linked servers there's a query timeout that can be set in the "Server Options" tab.

    The main issue is that the query doesn't return results in a reasonable time, so I would not raise the timeout, rather I'd fix the query.

    Regards

    Gianluca

    -- Gianluca Sartori

  • Use sp_configure to change the value of 'remote query timeout'

    it is in advanced option

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

Viewing 5 posts - 1 through 4 (of 4 total)

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