G
Guest
I have an Winforms application that's using ADO.NET to access a SQL Server database. The connection is NOT pooled, and is kept alive for as long as the application is active. It also creates a ##TEMP table to be able to detect an already running instance (only one can run at a time).
If the TCP connection between the application and SQL Server is broken, the connection stays alive "forever" in SQL Server, and the ##TEMP table is never removed, locking out other instances.
Is there something that the application can specify on the connection so that SQL Server can be made aware when the connection has been broken, and automatically close the session? I'd rather not have to require using the KILL command to kill the orphaned connection.
If the TCP connection between the application and SQL Server is broken, the connection stays alive "forever" in SQL Server, and the ##TEMP table is never removed, locking out other instances.
Is there something that the application can specify on the connection so that SQL Server can be made aware when the connection has been broken, and automatically close the session? I'd rather not have to require using the KILL command to kill the orphaned connection.