Can you post the whole statement? Why you're using select top (100) percent ? What is the commandTimeout property set to (the default is 30 seconds, you may want to increase it)?
Timeout error when generating data in SQL Server 2014
Hi
We keep getting a timeout error when generating data in SQL Server 2014. We have tried changing the timeout settings but it doesn't seem to make any changes to the problem. "Error Message: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding."
Any help getting this resolved will be much appreciated.
Kind regards
SQL Server Other
3 answers
Sort by: Most helpful
-
-
Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
2022-05-09T21:27:50.053+00:00 What more exactly do you mean with generating data? It would help to know the exact operation.
It does a little bit that it is a blocking issue. That is, you query is being blocked by an uncommitted transaction that is holding a lock, so maybe you should check for that.
-
Seeya Xi-MSFT 16,586 Reputation points
2022-05-10T02:56:33.677+00:00 Hi @Mike Beach ,
Welcome to Microsoft Q&A!
Regarding if it is a issue about blocking which mentioned by Erland, you can execsp_who2
and check if there is content in the blkby colum.
Of course, there are many other ways to see if it is a blocking issue.
There are two ways to capture traces which may include reason about this issue in SQL Server. Extended Events (XEvents) and Profiler Traces. However, SQL traces using the SQL Server Profiler are deprecated. So it is not recommended.
https://learn.microsoft.com/en-us/troubleshoot/sql/performance/troubleshoot-query-timeouts#troubleshooting-stepsBest regards,
Seeya
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.