Does SQL Server eventually terminate idle connections to the database?

  • We are only trying to answer the below questions regarding database connections for an audit. We are not having any issues, and nothing is broken. We are running SQL Server 2019 on Windows.

    1. Does SQL Server eventually terminate idle connections to the database?

    2. How to terminate an idle connection to a SQL Server Database within 30 minutes or less? (If I open a query window in SSMS and execute SELECT @@VERSION, it appears the connection continues to exist in a Sleeping State for a really long time.)

    3. How to determine (or test for) the life of an idle connection to a SQL Server Database?

    4. Is an Application Connection terminated or closed by the Application itself?

    Thanks in advance.

     

    • This topic was modified 1 year, 3 months ago by  HookSQLDBA7.
    1. I am not aware of such setting. On shutdown
    2. Using the kill command ?
    3. Query sys.dm_exec_connections ? Not sure if you can measure idle time
    4. Setup an extended event trace on sqlserver.connectivity_ring_buffer_recorded and read it out. It usually mentions broken network connections
  • This was removed by the editor as SPAM

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply