I have some questions about sys.sysprocesses/sys.dm_exec_sessions and sys.dm_exec_requests, please kindly give your guidance and comments, thanks!
1. under Microsoft SQL server Management Studio, when I execute select * from sys.dm_exec_sessions and select * from sys.sysprocesses, they have same pieces of records,
so spid of sys.sysprocesses is the same thing with the session_id of sys.dm_exec_sessions, is it right?
2. what is the relationship between sys.dm_exec_sessions and sys.sysprocesses ? and what is the similarity and difference between them ?
3. when we log in SQL Server successfully, then it will establish a session? but when we click new query, it seems to create a new session, so what is session_Id and request_id?
and what is the difference between session_id and request_id ?