DMV to replace sp_who and pass specific database | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

DMV to replace sp_who and pass specific database

Hi, Can someone remind me what’s the DMV that replaces sp_who in sql 2005? Supposed to be able to pass the database name to see spids on specific database.
I though it was dm_exec_connections, but there’s no database param option. Thanks
I don’t see any replacement to SP_who in SQL 2005, but there are few DMVs added to get more information. Let me see whether we can get more information about what you’re after. Satya SKJ
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Here’s how to do it:
select * from sys.dm_exec_requests
where database_id = db_id (‘master’)
]]>