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'

 

https://bit.ly/2lgLuJ1 https://bit.ly/2lAbgYW https://bit.ly/2ngU8ry

Leave a Reply

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