How to check active connections on your MS-SQL Database ?

To check active database connection in the MS SQL server please follow the below steps.

  1. Open the SQL server management studio. Please refer to how to connect MsSQL DB using SQL management studio.

  2. Right-click on the database and click on the execute button.

  3. Now, run the below select query to find our active connection on your database. Here, you need to add your database name instead of DB NAME.

    SELECT DB_NAME(dbid) AS DBName,
    COUNT(dbid) AS NumberOfConnections,
    FROM    sys.sysprocesses
    GROUP BY dbid, loginame
    ORDER BY DB_NAME(dbid)

You will see the result similar to below screen capture, it will show all the active database connection on your SQL server.

To check the active sessions/connection in the SQL server execute the below query in the SQL server management studio.

exec sp_who

The above query will show all the active users and sessions connected to the SQL server.

Related Articles

Microsoft SQL Server 2016 Recommendation

The SQL Server 2016 Express is the latest data management system from the Microsoft. Like the...

Unable to launch SQL Server Configuration Manager – Invalid class [0x80041010]

You may receive the below image while you access the server configuration manager on your windows...

Fix - Microsoft SQL Server, error: 10053 - An established connection was aborted by the software in your host machine

One of our Windows VPS customers received following error while connecting to MS SQL server....

How to set database size limit on MSSQL Server?

Please refer to the following steps to set the database size limit for Microsoft SQL Server....

Can I create unlimited MS SQL databases with unlimited database size?

Shared/Reseller Hosting: In Windows Shared/ Windows Reseller hosting you can create MS SQL...

  • 0 Users Found This Useful

Was this answer helpful?