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 run, sp_who reports the security-relevant information for the server process ID, its status, the login name of the process user, the real login name (if loginname is an alias), the name of the host computer, the server process ID of a process that is blocking this one (if any), the name of the database, and the command being run.
If you do not provide a login name or spid, sp_who reports on processes being run by all users.
The following example shows the security relevant results from executing sp_who without a parameter:
spid status loginame origname hostname blk dbname cmd ------ -------- -------- --------- -------- --- ------ -------- 1 running sa sa sunbird 0 pubs2 SELECT 2 sleeping NULL NULL 0 master NETWORK HANDLER 3 sleeping NULL NULL 0 master MIRROR HANDLER 4 sleeping NULL NULL 0 master AUDIT PROCESS 5 sleeping NULL NULL 0 master CHECKPOINT SLEEP (5 rows affected, return status = 0)
sp_who reports NULL for the loginame for all system processes.