Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've seen a couple of blog posts where fairly knowledgeable sounding MVPs are still using sys.sysprocesses rather than the recommended DMVs: sys.dm_exec_connections, sys.dm_exec_sessions and sys.dm_exec_requests.

Given that sysprocesses is deprecated, I'm curious why anyone would continue to use it, particularly MVPs. Is it just that using sysprocesses is less hassle than joining three DMVs or is there a better reason for using it?

The two blog posts I mentioned were:

Adam Machanic: Smashing a DMV Myth

Tim Chapman: Find blocking processes using recursion in SQL Server 2005

share|improve this question

migrated from Feb 9 '12 at 22:16

This question came from our site for professional and enthusiast programmers.

up vote 4 down vote accepted

sys.sysprocesses still contains information that is either very cumbersome or impossible to get from the DMVs, since they weren't complete (they are a bit better with each new release, but not 100% yet). Two standout examples:

  • database_id for a non-active request (e.g. there is a row in sys.dm_exec_sessions but not in sys.dm_exec_requests)
  • open transaction count (see Kalen Delaney's blog post)

I suspect this backward compatibility view will remain around until a few versions after they supply the information directly through the DMVs.

share|improve this answer
Thanks Aaron, for the explanation and the link. – Simon Tewsi Feb 8 '12 at 4:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.