sp_who

Description

Return status information for specified Open Server threads.

Syntax

sp_who [loginame | ’spid’]

Parameters

loginame

The user’s login name.

spid

The internal identification number of the thread to report on. The spid can be obtained from the output of a previous sp_ps or sp_who call. If no spid is specified, all threads are listed.

Examples

Example 1

1>execute utility...sp_who 
 2>go
  spid    status     loginame     hostname   blk cmd               
 -------- ---------- ------------ ---------- --- ----------------
        1 runnable                           0   NETWORK HANDLER
        2 sleeping                           0   CONNECT HANDLER
        3 sleeping                           0   DEFERRED HANDLER
        4 runnable                           0   SCHEDULER
       11 sleeping                hiram      0
       14 running    bud          sonoma     0

This example shows output from the sp_who procedure.

Usage

Table 4-6 summarizes the results returned as rows with these columns:

Table 4-6: Format of information returned (sp_who)

Column name

Datatype

Length

spid

CS_INT_TYPE

4

status

CS_CHAR_TYPE

10

loginame

CS_CHAR_TYPE

12

hostname

CS_CHAR_TYPE

10

blk

CS_INT_TYPE

3

cmd

CS_CHAR_TYPE

16

See also

sp_ps, sp_terminate