[Script Of Aug. 26] How to kill SQL Server connection which was an idle session

image image
Aug.
26
image

Script Download:   
The script is available for download from https://gallery.technet.microsoft.com/How-to-kill-SQL-Server-a33476b7.  You can also use  Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment.

DBA sometimes found SQL Server had a lot of idle connection and want to free these connection resources, but it is a terrible effort to kill these session one by one. This T-SQL script will bring DBA an easy way to manage idle session.

DBA will use the T-SQL script to manage idle session. If the SQL Server resource is tight and too many connection already cause the new connection failure, then DBA could use this script to kill these idle connection to let new request could be handled.

You can find more All-In-One Script Framework script samples at https://aka.ms/onescriptingallery