syssessions

The syssessions table provides general information on each user connected to the database server. In the state column, each bit position represents a separate flag. Thus, it might be easier to read values in the state column if the values are returned using the HEX function.
Table 1. syssessions table information

This table provides column, type, and description information for the syssessions table.

Column Type Description
sid integer Session ID
username char(32) User ID
uid smallint User ID number
pid integer Process ID of the client
hostname char(256) Hostname of client
tty char(16) Name of the user's stderr file
connected integer Time that user connected to the database server
feprogram

char(255)

pooladdr integer Session pool address
is_wlatch integer 1 if the primary thread for the session is waiting for a latch
is_wlock integer 1 if the primary thread for the session is waiting for a lock
is_wbuff integer 1 if the primary thread for the session is waiting for a buffer
is_wckpt integer 1 if the primary thread for the session is waiting for a checkpoint
is_wlogbuf integer 1 if the primary thread for the session is waiting for a log buffer
is_wtrans integer 1 if the primary thread for the session is waiting for a transaction
is_monitor integer 1 if the session is a special monitoring process
is_incrit integer 1 if the primary thread for the session is in a critical section
state integer Flags Hexadecimal Meaning
1 0x00000001 User structure in use
2 0x00000002 Waiting for a latch
4 0x00000004 Waiting for a lock
8 0x00000008 Waiting for a buffer
16 0x00000010 Waiting for a checkpoint
32 0x00000020 In a read call
64 0x00000040 Writing logical-log file to backup tape
256 0x00000100 In a critical section
512 0x00000200 Special daemon
1024 0x00000400 Archiving
2048 0x00000800 Clean up dead processes
4096 0x00001000 Waiting for write of log buffer
8192 0x00002000 Special buffer-flushing thread
16384 0x00004000 Remote database server
32768 0x00008000 Deadlock timeout used to set RS_timeout
65536 0x00010000 Regular lock timeout
262144 0x00040000 Waiting for a transaction
524288 0x00080000 Primary thread for a session
1048576 0x00100000 Thread for building indexes
2097152 0x00200000 B-tree cleaner thread