Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
The V$OB_PROCESSLIST view displays session information on the current OBServer node.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | VARCHAR2(46) | NO | IP address of the server. |
| SVR_PORT | NUMBER(38) | NO | Port of the server. |
| SQL_PORT | NUMBER(38) | NO | Port for SQL statements. |
| ID | NUMBER(38) | NO | Session ID. |
| USER | CHAR(193) | NO | Username. |
| HOST | VARCHAR2(128) | NO | Host name of the client. (For example, if you connect to the database through obproxy, this column displays the host address of obproxy.) |
| DB | VARCHAR2(128) | YES | Name of the database being accessed. |
| TENANT | VARCHAR2(128) | NO | Name of the tenant being accessed. |
| COMMAND | VARCHAR2(4096) | NO | Type of the current command. |
| TIME | NUMBER(38) | NO | Execution time of the current command in seconds. If the command is retried, the value is reset to 0. |
| TOTAL_TIME | NUMBER(38) | NO | Total execution time of the current command in seconds. If the command is retried, the value is not reset. |
| STATE | VARCHAR2(128) | YES | Current session status. |
| INFO | VARCHAR2(262143) | YES | This view displays the current command being executed. |
| PROXY_SESSID | NUMBER(38) | YES | If the client is obproxy, this column displays the proxy session ID. |
| MASTER_SESSID | NUMBER(38) | YES | ID of the master session, which is used to chain multiple subsessions of the same SQL statement. |
| USER_CLIENT_IP | VARCHAR2(46) | YES | IP address of the user client. |
| USER_HOST | VARCHAR2(128) | YES | Host name of the user client. |
| RETRY_CNT | NUMBER(38) | NO | Number of retries of the current command. |
| RETRY_INFO | NUMBER(38) | NO | Retry information of the current command, which is generally the error code of the last retry. |
| SQL_ID | VARCHAR2(32) | NO | SQL ID. |
| TRANS_ID | NUMBER(38) | NO | Transaction ID. |
| THREAD_ID | NUMBER(38) | NO | Thread ID. |
| SSL_CIPHER | VARCHAR2(4096) | YES | Name of the encryption cipher. |
| TRACE_ID | VARCHAR2(64) | YES | Trace ID. |
| TRANS_STATE | VARCHAR2(32) | YES | Transaction status. Valid values include:
|
| ACTION | VARCHAR2(4096) | YES | Name of the current operation set by calling the DBMS_APPLICATION_INFO.SET_ACTION procedure. |
| MODULE | VARCHAR2(4096) | YES | Name of the current operation set by calling the DBMS_APPLICATION_INFO.SET_MODULE procedure. |
| CLIENT_INFO | VARCHAR2(4096) | YES | Information set by calling the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure. |
| LEVEL | NUMBER(38) | NO | Level of full-link tracing and monitoring for the session. For example, 1 indicates level 1 diagnostic information.
NoteThis field was introduced in V4.2.1. |
| SAMPLE_PERCENTAGE | NUMBER(38) | NO | Sampling frequency for full-link tracing and monitoring for the session. For example, 50 indicates that diagnostic information is sampled at a 50% frequency.
NoteThis field was introduced in V4.2.1. |
| RECORD_POLICY | VARCHAR2(32) | NO | Recording strategy for full-link tracing and monitoring for the session. Valid values include:
NoteThis field was introduced in V4.2.1. |
| LB_VID | NUMBER(38) | NO | If you directly connect to the database through load balancing in a public cloud environment, this column displays the VPC ID of the load balancing service. Otherwise, it displays NULL.
NoteThis field was introduced in V4.2.1. |
| LB_VIP | VARCHAR2(46) | NO | If you directly connect to the database through load balancing in a public cloud environment, this column displays the IP address of the client connecting to the load balancing service. Otherwise, it displays NULL.
NoteThis field was introduced in V4.2.1. |
| LB_VPORT | NUMBER(38) | NO | If you directly connect to the database through load balancing in a public cloud environment, this column displays the port of the client connecting to the load balancing service. Otherwise, it displays NULL.
NoteThis field was introduced in V4.2.1. |
| IN_BYTES | NUMBER(38) | NO | Incoming traffic of the session in bytes.
NoteThis field was introduced in V4.2.1. |
| OUT_BYTES | NUMBER(38) | NO | Outgoing traffic of the session in bytes.
NoteThis field was introduced in V4.2.1. |
| USER_CLIENT_PORT | NUMBER(38) | NO | Client address information.
Note
|
| PROXY_USER | VARCHAR2(128) | YES |
Note
|
| SERVICE_NAME | VARCHAR2(64) | YES | Service name for which the session is created. If the session is not created by a service name, this column displays NULL.
Note
|
| TOTAL_CPU_TIME | NUMBER(38) | NO | CPU usage time of the current command in seconds.
Note
|
| TOP_INFO | VARCHAR2(262143) | YES | This view displays the information of the top-level PL statement where the executing SQL statement is located.
Note
|
| MEMORY_USAGE | NUMBER(38) | NO | The memory occupied by a single SQL statement, in bytes.
NoteFor V4.3.5, this field was introduced in V4.3.5 BP2. |
Sample queries
Query the session information of this OBServer node.
obclient [SYS]> SELECT * FROM SYS.V$OB_PROCESSLIST WHERE ROWNUM < = 1 \G
The query result is as follows:
*************************** 1. row ***************************
SVR_IP: 172.xx.xxx.xxx
SVR_PORT: 2882
SQL_PORT: 2881
ID: 3221659094
USER: SYS
HOST: 100.xx.xxx.xxx:12716
DB: SYS
TENANT: oracle001
COMMAND: Query
TIME: 0
TOTAL_TIME: 0
STATE: ACTIVE
INFO: SELECT * FROM SYS.GV$OB_PROCESSLIST
PROXY_SESSID: NULL
MASTER_SESSID: NULL
USER_CLIENT_IP: 100.xx.xxx.xxx
USER_HOST: %
RETRY_CNT: 0
RETRY_INFO: 0
SQL_ID: 0A6CF0E2AB2C1A1917AB1FFDF2BE9CFF
TRANS_ID: 23035
THREAD_ID: 2743
SSL_CIPHER: NULL
TRACE_ID: YB4**************************-0-0
TRANS_STATE: ACTIVE
ACTION: NULL
MODULE: NULL
CLIENT_INFO: NULL
LEVEL: 1
SAMPLE_PERCENTAGE: 10
RECORD_POLICY: SAMPLE_AND_SLOW_QUERY
LB_VID: NULL
LB_VIP: NULL
LB_VPORT: NULL
IN_BYTES: 448
OUT_BYTES: 0
USER_CLIENT_PORT: 12716
PROXY_USER: NULL
SERVICE_NAME: NULL
TOTAL_CPU_TIME: 0
TOP_INFO: NULL
MEMORY_USAGE: NULL
1 row in set