Use sp_who to report information about current users and processes on Adaptive Server:
sp_who [loginame | "spid"]
where:
loginame – is the user’s Adaptive Server login name. If you give a login name, sp_who reports information about processes being run by that user.
spid – is the number of a specific process.
For each process being run, sp_who reports the server process ID, its status, the login name of the process user, the name of the host computer, the server process ID of a process that’s blocking this one (if any), the name of the database, and the command being run.
If you do not give a login name or spid, sp_who reports on processes being run by all users.
The following example shows the results of executing sp_who without a parameter:
spid status loginame hostname blk dbname cmd ------ -------- -------- -------- --- ------ ---------------- 1 running sa sunbird 0 pubs2 SELECT 2 sleeping NULL 0 master NETWORK HANDLER 3 sleeping NULL 0 master MIRROR HANDLER 4 sleeping NULL 0 master AUDIT PROCESS 5 sleeping NULL 0 master CHECKPOINT SLEEP (5 rows affected, return status = 0)
sp_who reports NULL for the loginame for all system processes