Saturday, August 30, 2008

SQL Server SQLClient Timeouts 101 - Everything you’ve wanted to know about SQLClient Timeouts that can be covered in a few pages or less

Tone Poem - SqlClient Timeouts Revealed

“SqlClient.  First a classification of where timeouts can occur with SqlClient:

  1. When attempting to get a connection from the SqlClient connection pool
  2. When attempting to create a new fresh connection to server (not getting one from pool)
  3. When sending a command explicitly to the server
  4. When sending commands with "context connection=true"
  5. When sending commands implicitly (under the covers) to the server
  6. When executing asynchronous commands (BeginExecute...)
  7. When waiting for attention acknowledgement from server (special rare case)
  8. When sending TM commands
  9. When fetching rows
  10. When uploading rows using bulk copy

Login Timeouts

Explicit Command Execution Timeouts

SqlConnection and "context connection=true"

Implicit Command Timeouts

Asynchronous Command Execution Timeout

Cancel Timeout (attention acknowledgement timeout)

…”

How async command execution timeouts are handled (or not) was news to me. Learning more every day…

No comments:

Post a Comment

NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...

ALL comments are moderated. I will review every comment before it will appear on the blog.

Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...

I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...

Please see my comment policy for more information if you are interested.

Thanks,
Greg

PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...