MSSQL active connection 확인

less than 1 minute read

Microsoft SQL Server에서 프로그램당 active connection의 숫자를 확인하자.

SELECT PROGRAM_NAME, HOSTNAME, STATUS, COUNT(DBID) AS NumberOfConnections
FROM sys.sysprocesses
WHERE PROGRAM_NAME = '프로그램명(ex: node-mssql)'
GROUP BY PROGRAM_NAME, HOSTNAME, STATUS;

참고: https://docs.microsoft.com/en-us/sql/relational-databases/system-compatibility-views/sys-sysprocesses-transact-sql?view=sql-server-2017

Tags:

Categories:

Updated:

Leave a Comment