get list of active connections sql server, How to determine total number of open/active connections in ms sql, How to get detailed list of connections to database in sql server 2005, How to See Active SQL Server Connections For Database, how to see active SQL Server connections? - Stack Overflow, SQL server - get list of active connections to each database
SQL Puzzle | How to get List of Stored Procedures along with the table names for all DBs on a SERVER
Write a script to to get List of connections, their username and the database name on a Server
- The challenge is to do it with T-SQL statements only.
- Add your solution(s) in the comments section or send you solution(s) to firstname.lastname@example.org
SOLUTION – 1
-- SELECT DISTINCT DB_NAME(dbid) databaseName , COUNT(*) OVER (PARTITION BY dbid, loginame) [#Connections], loginame UserName FROM sys.sysprocesses WHERE dbid > 0 --
Add a comment if you have a solution in mind. I would love to learn it. We all need to learn.
Enjoy !!! Keep Learning