2

Recently i have discovered (i have to premit i am not a DBA) that there is the possibility to configure a timeout into SQL Serve property (which apply to all DB into the SQL Server instance) :

enter image description here

Ignoring the fact that the picture display a 0 timeout (i am experimenting, it will not be the final configuration); i am confused, because i know that the timeout should be configured into the client that connect to SQL Server instance (both connection and command timeout).

Now i wonder what happening if a SQL Sever configuration say that the timeout is 10 minutes and a client connect with a connection string of 20 minutes (both command and connection). Which timeout is applied?

1 Answer 1

6

This is not for regular connections, it is outgoing queries to linked servers. I.e., when your SQL Server is acting as a client towards other engines.

The sp_configure setting is named "remote query timeout (s)". Here is a quote from the documentation: "This value applies to an outgoing connection initiated by the Database Engine as a remote query.".

There's no server-side setting to force a timeout after a certain elapse time (AFAIK). The "closest" you can come, IMO, is the 'query governor cost limit' setting. But it isn't based on elapse time, it is based on estimated query bucks. Also, it doesn't time-out - it will prohibit start execution based on the estimate.

2
  • Thanks a lot for clarification. I know i am a bit offtopic to ask another question here in comments, but did you know if there is a way to limit also incoming connection?
    – Skary
    Commented May 10, 2022 at 10:22
  • Not offtopic. I'll add a comment at the end of my reply above in a minute... Commented May 10, 2022 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.