Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
clo
Starting Member
10 Posts |
Posted - 2010-09-24 : 03:09:33
|
Hi All,I'm confuse of session_id and SPID. Appreciate your help to clear my doubts as below:1. Is session_id (at msdb..sysjobactivity) and spid (at sp_who, sp_lock...) the same?2. If 'yes' to question 1, why some session_id available at sysjobactivity table is not shown at sp_who\sp_lock?3. If 'no' to question 1, what is the different of session_id (at msdb..sysjobactivity) and spid (at sp_who, sp_lock...)?4. How a new spid being generated at SQL Server (please provide scenario)? AFAIK, when i run select @@spid at new query page, new spid is displayed.5. Is that a job can have multiple spid? What is the relationship of job_id with session_id\spid?Thanks,Clo |
|
sathiesh2005
Yak Posting Veteran
85 Posts |
Posted - 2010-09-25 : 06:04:07
|
for your first question,A SPID is a session id in SQL server 2000 and earlier versions.both are same in earlier sql version <2000.@Sathiesh |
 |
|
clo
Starting Member
10 Posts |
Posted - 2010-09-26 : 23:32:39
|
Hi,Thanks for your reply.I;m using SQL Server 2005, are both session_id and spid the same at 2005?Thanks, Clo |
 |
|
|
|
|