sp_ps returns detailed status information on specified Open Server threads.
1>DCSERVER...sp_ps
2>go
spid Login Name Host Name Program Name Task Type ...
---- ---------- --------- ------------ -------------- ...
1 SERVER TASK ...
2 SERVER TASK ...
3 SERVER TASK ...
4 SERVICE TASK ...
11 hiram SITE HANDLER TASK ...
14 bud sonoma isql CHILD TASK ...
... Status Sleep Event Sleep Label Current Command ...
... ------- ----------- ----------- --------------- ...
... runnable 369448 NETWORK HANDLER ...
... sleeping 369544 MSG AVAILABLE CONNECT HANDLER ...
... sleeping 369640 MSG AVAILABLE DEFERRED HANDLER ...
... runnable 0 SCHEDULER ...
... sleeping 369736 MSG AVAILABLE ...
... running 416480 ...
... Blocked Run Current Stack Net Net
... By Ticks Priority Origin Writes Reads
... ------- ------ -------- -------- ------ -----
... 0 0 8 2794336 0 0
... 0 0 8 2810792 0 0
... 0 0 8 2827184 0 0
... 0 0 15 2843576 0 0
... 0 0 8 2859968 2 7
... 0 0 8 2909208 3 0
The information reported by sp_ps may be useful for debugging during application development.
loginame and spid are character string parameters. When using isql to execute sp_ps as a remote procedure call from an Adaptive Server, surround the spid in quotes to avoid a syntax error.
If you do not specify loginame or spid, sp_ps lists all current threads.