How to check connections for a particular Database in SQL Server

Below Script provides the connections details for a particular Database in SQL Server.


select spid,loginame,blocked,waittype,cpu,hostname,DB_NAME(dbid) AS DB_NAME ,status from sys.sysprocesses 
where DB_NAME(dbid)='your_Database_Name'

 

Leave a Reply

Your email address will not be published. Required fields are marked *