All Products
Search
Document Center

ApsaraDB RDS:Close a connection

Last Updated:Aug 28, 2023

Prerequisites

The RDS instance runs SQL Server 2012 or later.

Procedure

You can close only the connections initiated by you and cannot close other connections, such as backup connections. You can run the following command to close a connection:

KILL <Process ID>

You can execute the following statement to query active sessions and processes:

SELECT session_id, login_name, status 
FROM sys.dm_exec_sessions
WHERE is_user_process = 1