OceanBase logo

OceanBase

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

Product Overview
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

OceanBase

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

Product Overview
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.6.0

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogWhite PaperLive DemosTraining & CertificationTicket
    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.6.0
    iconOceanBase Database
    SQL - V 4.6.0
    Databases
    • OceanBase Database
    • OceanBase Cloud
    • OceanBase Tugraph
    • Interactive Tutorials
    • OceanBase Best Practices
    Tools
    • OceanBase Cloud Platform
    • OceanBase Migration Service
    • OceanBase Developer Center
    • OceanBase Migration Assessment
    • OceanBase Admin Tool
    • OceanBase Loader and Dumper
    • OceanBase Deployer
    • Kubernetes operator for OceanBase
    • OceanBase Diagnostic Tool
    • OceanBase Binlog Service
    Connectors and Middleware
    • OceanBase Database Proxy
    • Embedded SQL in C for OceanBase
    • OceanBase Call Interface
    • OceanBase Connector/C
    • OceanBase Connector/J
    • OceanBase Connector/ODBC
    • OceanBase Connector/NET
    SQL
    KV
    • V 4.6.0
    • 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.DBA_OB_LS

    Last Updated:2026-05-07 11:26:24  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 in the current tenant.

    Columns

    Column
    Type
    Nullable
    Description
    LS_ID bigint(20) NO The ID of the log stream.
    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 available.
    • DROPPING: The log stream is being dropped. You must migrate the tablets on the log stream.
    • TENANT DROPPING: The log stream is being dropped. You must drop the log stream.
    • WAIT OFFLINE: The data of the log stream is deleted. The log stream is waiting for garbage collection.
    • CREATE ABORT: The log stream is being dropped.
    PRIMARY_ZONE longtext YES The election priority of the log stream.
    UNIT_GROUP_ID bigint(20) NO The ID of the unit group.

    Note

    • For V4.6.x, this column is available starting with V4.6.0. The value of this column is always 0.
    • For V4.4.x, this column is available starting with V4.4.2. The value of this column is always 0.
    • For V4.2.5, this column is available starting with V4.2.5 BP5. The value of this column is always 0.
    LS_GROUP_ID bigint(20) NO The ID of the log stream group. For the system log stream (log stream 1) and broadcast log stream, this column displays 0, indicating that the log stream does not belong to any log stream group.
    CREATE_SCN bigint(20) unsigned NO The position at which the log stream starts to write logs.
    DROP_SCN bigint(20) unsigned NO The position at which the log stream is dropped. This position indicates the end of all user data. If the log stream is dropped, this column records the SCN at which the log stream is dropped. If the log stream is not dropped, this column is empty.
    SYNC_SCN bigint(20) unsigned NO The synchronization position of the log stream. This position indicates the SCN of the last transaction that is synchronized.
    READABLE_SCN bigint(20) unsigned NO The readable position of the log stream. This position indicates the minimum SCN at which the log stream can be read.
    FLAG varchar(2048) NO The flag of the log stream. Valid values:
    • Empty: normal log stream.
    • DUPLICATE: broadcast log stream of a user tenant. The replicated tables are created on this log stream.
    • BLOCK_TABLET_IN: indicates that a tablet cannot be created on this log stream.
    • DUPLICATE|BLOCK_TABLET_IN: indicates that a tablet cannot be created on the broadcast log stream.

    Note

    This column is available starting with V4.2.0.

    UNIT_LIST varchar(1216) NO The list of units where the user log stream is distributed. The value of this column is empty for the system log stream and broadcast log stream if no specific location is specified.

    Note

    • For V4.6.x, this column is available starting with V4.6.0.
    • For V4.4.x, this column is available starting with V4.4.2.
    • For V4.2.5, this column is available starting with V4.2.5 BP5.

    Sample query

    Query the status and restore progress of log streams in the current user tenant.

    obclient(root@mysql001)[oceanbase]> SELECT * FROM oceanbase.DBA_OB_LS;
    

    The query result is as follows:

    +-------+--------+--------------+---------------+-------------+---------------------+----------+---------------------+---------------------+------+-----------+
    | LS_ID | STATUS | PRIMARY_ZONE | UNIT_GROUP_ID | LS_GROUP_ID | CREATE_SCN          | DROP_SCN | SYNC_SCN            | READABLE_SCN        | FLAG | UNIT_LIST |
    +-------+--------+--------------+---------------+-------------+---------------------+----------+---------------------+---------------------+------+-----------+
    |     1 | NORMAL | zone1        |             0 |           0 |                NULL |     NULL | 1768205234345984000 | 1768205234345984000 |      |           |
    |  1001 | NORMAL | zone1        |             0 |        1001 | 1767769653174440000 |     NULL | 1768205234345984000 | 1768205234345984000 |      | 1001      |
    +-------+--------+--------------+---------------+-------------+---------------------+----------+---------------------+---------------------+------+-----------+
    2 rows in set
    

    References

    • Query the status and restore progress of log streams in all tenants: CDB_OB_LS

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

    Previous topic

    oceanbase.DBA_OB_LOG_RESTORE_SOURCE
    Last

    Next topic

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