Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 807
  • Last Modified:

sp_who2 and sys.dm_exec_requests return me difference rows

In sql2005 I run sp_who2 and found bunch of rows with this sp then I try with DMV select * from sys.dm_exec_requests but it return me very less process, why?
so if sys.dm_exec_requests only return me less process as compare to sp_who2 what will be the benefit of using this DMV?
2 Solutions
when you loock at the status or cmd you'll see the diffrence

status 'suspend' or cmd 'awaiting command'   are not realy active tasks
jogos is right.

The view, sys.dm_exec_requests, contains one row for every currently executing process.
The view, sys.dm_exec_sessions, returns information on each session. The procedure,sp_who2, returns the current activity on the database (in whatever state).

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now