开发者

How does SQL Server and IIS handle broken connections?

In an ASP.NET application, what happens if an error occurs when returning the results of开发者_如何学编程 a stored procedure.

For example:

How does SQL Server and IIS handle broken connections?

In the diagram above, the ASP.NET application calls a stored procedure to obtain some data, the stored procedure executes and SQL server tries to send back the results.

But what if IIS is not reachable, what does SQL server do?

  • Does SQL Server attempt to send the results over and over again?
  • Is there a time out?
  • Is the server storing the data somewhere?
  • Does IIS keep sending the request over and over again?


To answer your questions:

  • Does SQL Server attempt to send the results over and over again?

    No if the connection between IIS and SQL server has died then SQL will kill the job and log an error.

  • Is there a time out?

    The SQL client in your ASP.NET application will thrown an exception either because the request has timed out or because the connection has died.

  • Is the server storing the data somewhere?

    If the stored procedure explicitly uses temp tables then there may be some data associated with the task that SQL will clean up.

  • Does IIS keep sending the request over and over again?

    Not unless you write code to do this.


SQL Server will log an error around the TDS stream and the batch will terminate.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜