master database only
sysprocesses contains information about Adaptive Server processes, but it is not a normal table. It is built dynamically when queried by a user. No updates to sysprocesses are allowed. Use the kill statement to kill a process.
The columns for sysprocesses are:
Name |
Datatype |
Description |
---|---|---|
spid |
smallint |
Process ID. |
kpid |
int |
Kernel process ID. |
enginenum |
int |
Number of engine on which process is being executed. |
status |
char(12) |
Process ID status (see Table 1-19). |
suid |
int |
Server user ID of user who issued command. |
hostname |
varchar(30) null |
Name of host computer. |
program_name |
varchar(30) null |
Name of front-end module. |
hostprocess |
varchar(30) null |
Host process ID number.. |
cmd |
varchar(30) null |
Command or process currently being executed.
Evaluation of a conditional statement, such as an if or while loop,
returns |
cpu |
int |
Cumulative CPU time for process in ticks |
physical_io |
int |
Number of disk reads and writes for current command. |
memusage |
int |
Amount of memory allocated to process. |
blocked |
smallint |
Process ID of blocking process, if any. |
dbid |
smallint |
Database ID. |
uid |
int |
ID of user who executed command. |
gid |
int |
Group ID of user who executed command. |
tran_name |
varchar(64) null |
Name of the active transaction. |
time_blocked |
int null |
Time blocked in seconds. |
network_pktsz |
int null |
Current connection’s network packet size. |
fid |
smallint null |
Process ID of the worker process’ parent. |
execlass |
varchar(30) null |
Execution class that the process is bound to. |
priority |
varchar(10) null |
Base priority associated with the process. |
affinity |
varchar(30) null |
Name of the engine to which the process has affinity. |
id |
int null |
Object ID of the currently running procedure (or 0 if no procedure is running). |
stmtnum |
int null |
The current statement number within the running procedure (or the SQL batch statement number if no procedure is running). |
linenum |
int null |
The line number of the current statement within the running stored procedure (or the line number of the current SQL batch statement if no procedure is running). |
origsuid |
int null |
Original server user ID. If this value is not NULL, a user with an suid of origsuid executed set proxy or set session authorization to impersonate the user who executed the command. |
block_xloid |
int null |
Unique lock owner ID of a lock that is blocking a transaction. |
clientname |
varchar(30) null |
Optional – name by which the user is know for the current session. Adaptive Server automatically stores one or more spaces
in clientname, clienthostname,
and clientapplname columns. For this reason,
a query using any of these three columns that includes “ |
clienthostname |
varchar(30) null |
Optional – name by which the host is known for the current session. |
clientapplname |
varchar(30) null |
Optional – name by which the application is known for the current session. |
sys_id |
smallint null |
Unique identity of companion node. |
ses_id |
int null |
Unique identity of each client session. |
loggedindatetime |
datetime null |
Shows the time and date when the client connected to Adaptive Server. See “Row-level access control“ in Chapter 11, “Managing User Permissions” of the System Administration Guide for more information. |
ipaddr |
varchar(64) null |
IP address of the client where the login is made. See “Row-level access control“ in Chapter 11, “Managing User Permissions” of the System Administration Guide for more information. |
nodeid |
tinyint null |
Reserved for future use. |
Table 1-19 lists the values for the status column:
Copyright © 2005. Sybase Inc. All rights reserved. |