SQLTeam.com | Weblogs | Forums

SQL Query

I am trying to run a SQL query for finding out which process (TID) of SQLServer is causing high CPU.

I ran process explorer and found that some of the TIDs are

TID 8380
TID 8748
TID 11504
TID 11688
TID 1768
TID 1760

So, I tried running the query as shown

USE DBname
Select SPID from sysprocesses where kpid=8792

I am not sure what to select for SPID and sysprocesses. Should I select @@SPID for SPID and for sysprocessess what should I select? I am new to SQL DB administration never had done a query.