OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Binlog Service

V4.3.6
  • Overview
  • Compatibility
  • Deployment guide
  • Configuration Information
    • Metadata
    • Local configurations
  • Control Commands
    • Overview
    • Node management
    • Task management
    • Instance management
    • Session management
    • File management
  • Monitoring and alerting
  • Troubleshooting
  • User Manual
    • Install obcdc
    • Update and upgrade
    • Performance tuning
  • Release Notes
    • Version history
    • obbinlog V4.3.6
    • obbinlog V4.3.5
    • obbinlog V4.3.2
    • obbinlog V4.3.1
    • obbinlog V4.3.0
    • obbinlog V4.2.10
    • obbinlog V4.2.5
    • obbinlog V4.2.4
    • obbinlog V4.2.3
    • obbinlog V4.2.1
    • obbinlog V4.2.0
    • obbinlog Community Edition V4.0.1

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Binlog Service
  3. V4.3.6

Session management

Last Updated:2026-09-03 10:36:38

Query connection sessions on a binlog instance
Syntax
Parameters
Examples
Terminate a connection session on a binlog instance
Syntax
Parameters
Examples

Query connection sessions on a binlog instance

You can query the connection sessions on a binlog instance. For more information, see SHOW PROCESSLIST Statement.

Syntax

SHOW [FULL] PROCESSLIST FOR INSTANCE instance_name; 

Parameters

Parameter
Description
FULL Optional. If you do not specify this parameter, the SHOW PROCESSLIST statement shows only the former 100 characters of each statement in the Info column.
instance_name The name of the binlog instance to query.

Examples

Query the connection sessions on the specified binlog instance.

SHOW FULL PROCESSLIST FOR INSTANCE eo46r4f2e8;

The output is as follows:

+-------+------+-----------------+------+---------+------+-------+-----------------------+
| Id    | User | Host            | db   | Command | Time | State | Info                  |
+-------+------+-----------------+------+---------+------+-------+-----------------------+
| 54286 | OBM  | 10.10.10.1:0    | NULL | Query   |    0 | Init  | SHOW FULL PROCESSLIST |
+-------+------+-----------------+------+---------+------+-------+-----------------------+

The following table describes the columns in the result set.

Column
Description
Id The ID of the session.
User The user of the session. The user OBM is an internal user of the binlog server.
Host The server of the connection session.
db The default database of the thread. The value NULL indicates that no default database has been selected.
Command The type of the statement executed on the client. The value Sleep indicates that the session is idle.
Time The duration that the thread remains in the current status, in seconds.
State The operation or event being executed by the thread, or the status of the thread.
Info The statement being executed by the thread. The value NULL indicates that no statement is being executed.

Terminate a connection session on a binlog instance

You can terminate a connection session on a binlog instance. For more information, see KILL Statement.

Syntax

KILL [CONNECTION | QUERY] processlist_id FOR INSTANCE instance_name; 

Parameters

Parameter
Description
KILL CONNECTION Terminates the ongoing statement of the connection, as well as the connection associated with the given processlist_id.
KILL QUERY Terminates the ongoing statement of the connection but retains the connection.
processlist_id The ID of the session, which is the value of Id in the output of the SHOW [FULL] PROCESSLIST statement.
instance_name The name of the binlog instance whose session is to be terminated.

Examples

  1. Query the sessions on the specified binlog instance.

    SHOW PROCESSLIST FOR INSTANCE yfj056ib5w;
    

    The output is as follows:

    +--------+------+-----------------+------+---------+--------+-------+------------------+
    | Id     | User | Host            | db   | Command | Time   | State | Info             |
    +--------+------+-----------------+------+---------+--------+-------+------------------+
    | 169693 | OBM  | 10.10.10.1:0    | NULL | Sleep   | 162986 |       |                  |
    | 184362 | OBM  | 10.10.10.1:0    | NULL | Sleep   | 147985 |       |                  |
    | 329035 | OBM  | 10.10.10.1:0    | NULL | Query   |      0 | Init  | SHOW PROCESSLIST |
    +--------+------+-----------------+------+---------+--------+-------+------------------+
    
  2. Terminate the session with the ID 169693, as well as the connection associated with this ID.

    KILL CONNECTION 169693 FOR INSTANCE yfj056ib5w;
    
  3. Terminate the session with the ID 184362 but retain the connection.

    KILL QUERY 184362 FOR INSTANCE yfj056ib5w;
    
  4. Query the sessions on this binlog instance again.

    SHOW PROCESSLIST FOR INSTANCE yfj056ib5w;
    

    The output is as follows:

    +--------+------+-----------------+------+---------+------+-------+------------------+
    | Id     | User | Host            | db   | Command | Time | State | Info             |
    +--------+------+-----------------+------+---------+------+-------+------------------+
    | 184362 | OBM  | 10.10.10.1:0    | NULL | Sleep   |    1 |       |                  |
    | 329086 | OBM  | 10.10.10.1:0    | NULL | Query   |    0 | Init  | SHOW PROCESSLIST |
    +--------+------+-----------------+------+---------+------+-------+------------------+
    

Previous topic

Instance management
Last

Next topic

File management
Next
on this page
Query connection sessions on a binlog instance
Syntax
Parameters
Examples
Terminate a connection session on a binlog instance
Syntax
Parameters
Examples