How to find Total connection in sql server ? SELECT COUNT(dbid) as TotalConnections FROM sys.sysprocesses WHERE dbid > 0