January 25, 2010 at 11:56 pm
Dear Experts
sp_who2 is a stored procedure and shows the details of the active connection to the server. Similarly "sysprocesses" table can also be used to fetch the same details along with some additional attribute details.
Is the only reason to choose sysprocesses table?
One thing I have noticed when you fire "select * from sysprocesses", many SPIDs will be reflected and look little clumsy to investigate the details rather "sp_who2" is little better.
Can you shade some light on this with your experience on this!
Thanks.
January 26, 2010 at 8:46 pm
I'm not sure what the question is. If you're asking why to ever use the SysProcesses table instead of sp_Who2, it may be because there are a lot of people who need the data in a table format and don't understand how to capture the output of sp_Who2 in a table for additional processing. The big problem for most is the fact that sp_Who2 outputs 2 identical SPID columns which messes up most chances to create a table on the fly and people don't want to take the time to map one out so they can do a very simple INSERT/EXEC.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply