SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

System Sessions/Spids Rather than Spid < 50

Saw System Sessions posted on the PSS blog and it shows an example of information being written to the error log as 'spid5s', where the trailing 's' indicates a system session (spid). You can also filter them out of the processes by doing this:

select * from sysprocesses where spid < 50" you should use "select * from sys.dm_exec_sessions where is_user_process = 0"

Not a huge change, but using spid < 50 always seemed like a hack. We'll never have more than 50 system spids!

SQLAndy

I'm Andy Warren, currently a SQL Server trainer with End to End Training. Over the past few years I've been a developer, DBA, and IT Director. I was one of the original founders of SQLServerCentral.com and helped grow that community from zero to about 300k members before deciding to move on to other ventures.

Comments

No comments.

Leave a Comment

Please register or log in to leave a comment.