Purpose
You can use this statement to query the process list of the current tenant.
Note
Only the super administrator (
root@proxysys) of OceanBase Database Proxy (ODP) can execute this statement to query the session information of all tenants in a cluster, and execute theKILLstatement to terminate a session of any tenant in the cluster.A user in the sys tenant of an OceanBase cluster can execute this statement to query the session information of all tenants in the current cluster, and execute the
KILLstatement to terminate any session in the current tenant.Other normal users can perform operations only on sessions of the current user based on their privileges. By default, a normal user can only execute this statement to query the session information of the current user but cannot query the cluster information.
Syntax
SHOW [FULL] PROCESSLIST;
Parameters
| Parameter | Description |
|---|---|
| PROCESSLIST | The brief process list. Options:
|
| FULL PROCESSLIST | The complete process list, including the details of each process. Options:
|
Examples
Note
For more information about this statement, see Server session.
Use the
SHOW PROCESSLISTstatementobclient [SYS]> SHOW PROCESSLIST;The output is as follows:
+------------+------+----------------------+------+---------+------+--------+------------------+ | ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO | +------------+------+----------------------+------+---------+------+--------+------------------+ | 3221488068 | SYS | 100.xx.xxx.xxx:18985 | SYS | Sleep | 298 | SLEEP | NULL | | 3221488078 | SYS | 100.xx.xxx.xxx:32489 | SYS | Query | 0 | ACTIVE | SHOW PROCESSLIST | +------------+------+----------------------+------+---------+------+--------+------------------+Use the
SHOW FULL PROCESSLISTstatementobclient [SYS]> SHOW FULL PROCESSLIST;The output is as follows:
+------------+------+-----------+----------------------+------+---------+------+--------+-----------------------+----------------+------+ | ID | USER | TENANT | HOST | DB | COMMAND | TIME | STATE | INFO | IP | PORT | +------------+------+-----------+----------------------+------+---------+------+--------+-----------------------+----------------+------+ | 3221488068 | SYS | oracle001 | 100.xx.xxx.xxx:18985 | SYS | Sleep | 548 | SLEEP | NULL | 172.xx.xxx.xxx | 2881 | | 3221488078 | SYS | oracle001 | 100.xx.xxx.xxx:32489 | SYS | Query | 0 | ACTIVE | SHOW FULL PROCESSLIST | 172.xx.xxx.xxx | 2881 | +------------+------+-----------+----------------------+------+---------+------+--------+-----------------------+----------------+------+