Thanks Paul, I had trouble getting
governor_cost_limit to kick in when doing a test in SSMS, but as you said, SSMS seem to overrule the server-wide setting.
And I found the option in SSMS here:
And of course the server-wide option in GUI (in properties for the server):
To set it by SQL statement:
EXEC sp_configure 'show advanced options', 1;
EXEC sp_configure 'query governor cost limit', 120 ;
After setting the SSMS option it now kick in when I do a test. It will cancel the query almost immediately (when the server has calculated an estimate), not when the query has elapsed the specified seconds.
I get this "error" from the server:
The query has been canceled because the estimated cost of this query (965) exceeds the configured threshold of 10. Contact the system administrator.
Look forward to receive my first mail/phone calls from the clients whining.
I have wasted hours on these timeout SQL issues.