Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi all, Can someone help me out 1

Status
Not open for further replies.

goofy

Programmer
Feb 3, 2001
30
0
0
US
Hi all,

Can someone help me out on how to differentiate between a system process or a user process in sql server

Thanks
 
I am not sure whether this is what oyu are looking for.

use master

select loginame,spid from sysprocesses where spid <=50 is system process
select loginame,spid from sysprocesses where spid >=51 is
user process
 
Hi

&quot;SELECT MIN(SPID) FROM SYSPROCESSES WHERE DBID= <ID OF A DATABASE>&quot;

What is the possibility of getting a SPID 5 (which is a task manager - system process) while using a query specified above. Provided a database id is specified in the where clause

I used a above specified query with in a stored procedure and the SPID returned was 5

Thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top