Displays information about all current users and connections, or about a particular user or connection.
Enclose the arg-type value in double quotes.
The sp_iqwho stored procedure displays information about all current users and connections, or about a particular user or connection.
Column name |
Description |
---|---|
ConnHandle |
The SA connection handle |
IQConnID |
The SAP Sybase IQ specific connection ID |
Userid |
The name of the user that opened the connection “ConnHandle” |
BlockedOn |
The connection on which a particular connection is blocked; 0 if not blocked on any connection |
BlockUserid |
The owner of the blocking connection; NULL if there is no blocking connection |
ReqType |
The type of the request made through the connection; DO_NOTHING if no command is issued |
IQCmdType |
The type of SAP Sybase IQ command issued from the connection; NONE if no command is issued |
IQIdle |
The time in seconds since the last SAP Sybase IQ command was issued through the connection; in case of no last SAP Sybase IQ command, the time since ‘01-01-2000’ is displayed |
SAIdle |
The time in seconds since the last SA request was issued through the connection; in case of no last SA command, the time since ‘01-01-2000’ is displayed |
IQCursors |
The number of active cursors in the connection; 0 if no cursors |
IQThreads |
The number of threads with the connection. At least one thread is started as soon as the connection is opened, so the minimum value for IQThreads is 1. |
TempTableSpaceKB |
The size of temporary table space in kilobytes; 0 if no temporary table space is used |
TempWorkSpaceKB |
The size of temporary workspace in kilobytes; 0 if no temporary workspace is used |
sp_who column |
sp_iqwho column |
---|---|
fid |
Family to which a lock belongs; omitted, as not applicable to SAP Sybase IQ |
spid |
ConnHandle, IQConnID |
status |
IQIdle, SAIdle |
loginame |
Userid |
origname |
User alias; omitted, as not applicable to SAP Sybase IQ |
hostname |
Name of the host on which the server is running; currently not supported |
blk_spid |
BlockedOn |
dbname |
Omitted, as there is one server and one database for SAP Sybase IQ and they are the same for every connection |
cmd |
ReqType, IQCmdType |
block_xloid |
BlockUserid |
If no parameters are specified, sp_iqwho displays information about all currently active connections and users.
Either a connection handle or a user name can be specified as the first sp_iqwho parameter. The parameters connhandle and user-name are exclusive and optional. Only one of these parameters can be specified at a time. By default, if the first parameter is numeric, the parameter is assumed to be a connection handle. If the first parameter is not numeric, it is assumed to be a user name.
sp_iqwho 1, “user”When the arg-type “user” is specified, sp_iqwho interprets the first parameter 1as a user name, not as a connection ID. If a user named 1 exists in the database, sp_iqwho displays information about connections opened by user 1.
Syntax |
Output |
---|---|
sp_iqwho |
Displays all active connections |
sp_iqwho 3 |
Displays information about connection 3 |
sp_iqwho “DBA” |
Displays connections opened by user DBA |
sp_iqwho 3, “user” |
Interprets 3 as a user name and displays connections opened by user 3. If user 3 does not exist, returns the error “User 3 does not exist” |
sp_iqwho non-existing-user |
Returns error “User non-existing-user does not exist” |
sp_iqwho 3, “xyz” |
Returns the error “Invalid parameter: xyz” |