none
Auto replace corrupted Connection after server recycle/failover or network glitch? RRS feed

  • Question

  • Hi,

     

    I am currently using the .Net framework 2.0 (and SQL Server 2005 with clustering and mirroring).

     

    Angel Saenz-Badillos posted in http://blogs.msdn.com/angelsb/archive/2004/10/05/238153.aspx that after a SQL Server recycle or failover (or after a network glitch), the database connections in a connection pool get invalidated ("doomed").

     

    The first one to try execute a command on such a connection will receive an error. ADO.NET will then automatically sort of "clear" the connection pool, so that the following attempts to execute a command over connections asked to the pool will succeed (if the DB is back online of course).

     

    In theory, the ADO.NET framework could, upon discovering the error described, automatically replace the underlying connection by a new one (if possible) and execute your command. This would make sure the first error does not reach the user.

    Angel writes about this feature "I certainly hope it makes it into a future version".

     

    Does anyone know if this possible change in behaviour of ADO.NET has already been put into more recent versions of the .Net framework?

     

    Thx!

     

    Pieter

    Monday, March 17, 2008 4:33 PM

Answers

  • No, we have not added this "auto-reconnect on failure" feature yet in ADO.NET in any version.

    Also I don't know of any ETA as to when this will be added, but I will double check our plans.

     

     

    Monday, March 17, 2008 5:50 PM