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

    Query log stream upgrade/downgrade information

    Last Updated:2026-05-07 11:26:24  Updated
    Share
    What is on this page
    Query log stream upgrade/downgrade events
    Query the log stream upgrade/downgrade result
    References

    folded

    Share

    After you enable the arbitration service for a tenant, you can query views for information about the upgrade or downgrade of log streams in the tenant.

    Query log stream upgrade/downgrade events

    You can query the DBA_OB_SERVER_EVENT_HISTORY view in the sys tenant for the upgrade and downgrade events of all log streams.

    1. Log in to the sys tenant of the cluster as the root user.

    2. Execute the following statements to query whether log stream upgrade or downgrade events have occurred.

      • Query log stream downgrade events

        SELECT * FROM oceanbase.DBA_OB_SERVER_EVENT_HISTORY WHERE event LIKE "%DEGRADE%";
        

        If the query result is empty, no log stream is downgraded. Otherwise, the query result shows the information about log stream replicas that have downgraded and the reasons for the degradation.

        Reasons for the degradation are as follows:

        • CRASHED_OR_BROKEN_NETWORK: Indicates that an OBServer node has crashed or lost network connection. Or, the observer process was killed, or exited unexpectedly.
        • LOG_DISK_HANG_OR_FULL: Indicates that the log disk is stuck in writing (physical failure) or the tenant log disk space is full.
        • SERVER_STOPPED_OR_ZONE_STOPPED: Indicates that the STOP ZONE or STOP SERVER command was executed.
        • LOG_SYNC_DISABLED: Indicates that the replica log synchronization is lagging behind.
        • LOG_VOTE_DISABLED: Indicates that a rebuild operation was performed on the replica.
      • Query log stream upgrade events

        SELECT * FROM oceanbase.DBA_OB_SERVER_EVENT_HISTORY WHERE event LIKE "%UPGRADE%";
        

        If the query result is empty, no log stream is upgraded. Otherwise, the query result shows the information about log stream replicas that have upgraded.

    Query the log stream upgrade/downgrade result

    After a log stream upgrade or downgrade event occurs, you can query the GV$OB_LOG_STAT view in the sys tenant or the V$OB_LOG_STAT view in a user tenant for the upgrade or downgrade result of the log stream.

    1. Log in to the sys tenant or a user tenant as the administrator.

    2. Execute the following statement to query the log stream upgrade or downgrade result.

      • sys tenant

        obclient(root@sys)[(none)]> SELECT * FROM oceanbase.GV$OB_LOG_STAT WHERE tenant_id= xxxx;
        
      • User tenant

        MySQL mode
        Oracle mode

        The syntax is as follows:

        obclient(root@mysql)[(none)]> SELECT * FROM oceanbase.GV$OB_LOG_STAT WHERE tenant_id= xxxx;
        

        The syntax is as follows:

        obclient(sys@oracle)[SYS]> SELECT * FROM SYS.GV$OB_LOG_STAT WHERE tenant_id= xxxx;
        

      In the query result, view the DEGRADED_LIST column corresponding to the log stream replica whose role is LEADER. If a log stream downgrade event occurs, the log stream replica downgraded due to an exception is displayed in this column. If a log stream upgrade event occurs, the upgraded replica is removed from this column.

    References

    For more information about log stream upgrade and downgrade, see the following topics:

    • Arbitration service overview

    • Modify the log stream downgrade control time

    Previous topic

    Modify the log stream downgrade control time
    Last

    Next topic

    Replace the arbitration service for a cluster
    Next
    What is on this page
    Query log stream upgrade/downgrade events
    Query the log stream upgrade/downgrade result
    References