Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions Links


SQL Server DBA Jobs

Error 3621 - The statement has been terminated

03 September,2014 by Tom Collins

Question: A client is sending a query to a SQL Server . After 30 seconds a message appears on the SQL Server trace:

User error message : The statement has been terminated

If  I run the code from SSMS, it completes successfully. Could you explain how I can fix this problem?

Answer: SQL Server runs queries  with no timeout.  The  query timeout error is occurring  on the client side.  When a command exceeds the timeout duration,  the client API sends an attention signal to SQL Server to cancel the executing query. 

An example is the CommandTimeout property, defaulting to 30 seconds in ADO and ADO.NET.

If you have the Attention event added to the SQL Server trace, you’ll notice it appearing. In addition,  the client API throws the timeout expired exception error message. You could recreate the message by executing the code from SSMS and hitting the cancel after 30 seconds

Read More

SQL Server – Troubleshooting the SQL Profiler trace Attention class event

SQL Server – How to troubleshoot query timeouts

SQL Server SLEEPING MODE , locks and transactions

What is SQL Server Query Tuning?

Author: Tom Collins (


Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment on Error 3621 - The statement has been terminated | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer