OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V4.4.2

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & Certification
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V4.4.2
    iconOceanBase Database
    SQL - V 4.4.2
    SQL
    KV
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    oceanbase.CDB_OB_LS

    Last Updated:2026-04-14 03:51:52  Updated
    share
    What is on this page
    Purpose
    Columns
    Sample query
    References

    folded

    share

    Note

    This view is available starting with V4.0.0.

    Purpose

    This view displays the status and restore progress of log streams for all tenants.

    Columns

    Column Type Nullable Description
    TENANT_ID bigint(20) NO The tenant ID.
    LS_ID bigint(20) NO The log stream ID.
    STATUS varchar(100) NO The status of the log stream. Valid values:
    • CREATING: The log stream is being created.
    • CREATED: The log stream is created.
    • NORMAL: The log stream is ready to provide services.
    • DROPPING: The log stream is to be dropped. The tablets on the log stream must be migrated before the log stream is dropped.
    • TENANT DROPPING: The tenant to which the log stream belongs is being dropped. The log stream must be dropped before the tenant is dropped.
    • WAIT OFFLINE: The data of the log stream has been dropped and is waiting for garbage collection (GC).
    • CREATE ABORT: The log stream creation is aborted. The log stream is to be dropped.
    PRIMARY_ZONE longtext YES The priority of the log stream for election.
    UNIT_GROUP_ID bigint(20) NO The ID of the unit group.

    Note

    • For V4.4.x, this field is available starting from V4.4.2. The value of this field is always 0.
    • For V4.2.5, this field is available starting from V4.2.5 BP5. The value of this field is always 0.
    LS_GROUP_ID bigint(20) NO The ID of the log stream group. For system log streams (log stream 1) and broadcast log streams, this field is 0, indicating that the log stream does not belong to a log stream group.
    CREATE_SCN bigint(20) unsigned NO The SCN at which the log stream starts to write logs.
    DROP_SCN bigint(20) unsigned NO The SCN at which the log stream is dropped. This SCN marks the end of all user data. If the log stream is dropped, this field records the SCN at which the log stream is dropped. If the log stream is not dropped, this field is empty.
    SYNC_SCN bigint(20) unsigned NO The SCN of the last transaction that is successfully synchronized with the log stream.
    READABLE_SCN bigint(20) unsigned NO The SCN of the earliest readable log in the log stream.
    FLAG varchar(2048) NO The log stream flag. Valid values:
    • Empty: Normal log stream.
    • DUPLICATE: Broadcast log stream of a user tenant. A replicated table is created on this log stream.
    • BLOCK_TABLET_IN: A tablet cannot be created on this log stream.
    • DUPLICATE|BLOCK_TABLET_IN: A tablet cannot be created on this broadcast log stream.

    Note

    This field is available starting with V4.2.0.

    UNIT_LIST varchar(1216) NO The list of units where user log streams are distributed. For system log streams and broadcast log streams, this field is empty if the specific location is not specified.

    Note

    • For V4.4.x, this field is available starting from V4.4.2.
    • For V4.2.5, this field is available starting from V4.2.5 BP5.

    Sample query

    Query the status and restore progress of all log streams for all tenants in the sys tenant.

    obclient(root@sys)[oceanbase]> SELECT * FROM oceanbase.CDB_OB_LS;
    

    The query result is as follows:

    +-----------+-------+--------+--------------+---------------+-------------+---------------------+----------+---------------------+---------------------+------+-----------+
    | TENANT_ID | LS_ID | STATUS | PRIMARY_ZONE | UNIT_GROUP_ID | LS_GROUP_ID | CREATE_SCN          | DROP_SCN | SYNC_SCN            | READABLE_SCN        | FLAG | UNIT_LIST |
    +-----------+-------+--------+--------------+---------------+-------------+---------------------+----------+---------------------+---------------------+------+-----------+
    |         1 |     1 | NORMAL | zone1        |             0 |           0 |                NULL |     NULL |                NULL |                NULL |      |           |
    |      1001 |     1 | NORMAL | zone1        |             0 |           0 |                NULL |     NULL |                NULL |                NULL |      |           |
    |      1002 |     1 | NORMAL | zone1        |             0 |           0 |                NULL |     NULL | 1768205075324901000 | 1768205075223955000 |      |           |
    |      1002 |  1001 | NORMAL | zone1        |             0 |        1001 | 1767769653174440000 |     NULL | 1768205075324901000 | 1768205075223955000 |      | 1001      |
    |      1003 |     1 | NORMAL | zone1        |             0 |           0 |                NULL |     NULL |                NULL |                NULL |      |           |
    |      1004 |     1 | NORMAL | zone1        |             0 |           0 |                NULL |     NULL | 1768205075324901001 | 1768205075324901001 |      |           |
    |      1004 |  1001 | NORMAL | zone1        |             0 |        1001 | 1767769662964400002 |     NULL | 1768205075224971000 | 1768205075224971000 |      | 1002      |
    +-----------+-------+--------+--------------+---------------+-------------+---------------------+----------+---------------------+---------------------+------+-----------+
    7 rows in set
    

    References

    • Query the status and restore progress of log streams for the current tenant: DBA_OB_LS

    • For more information about log stream replicas, see Replica introduction.

    Previous topic

    oceanbase.CDB_OB_LOG_RESTORE_SOURCE
    Last

    Next topic

    oceanbase.CDB_OB_LS_ARB_REPLICA_TASK_HISTORY
    Next
    What is on this page
    Purpose
    Columns
    Sample query
    References