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.3.5

    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.3.5
    iconOceanBase Database
    SQL - V 4.3.5
    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

    ob_error

    Last Updated:2026-04-09 08:28:55  Updated
    share
    What is on this page
    Install ob_error
    Install ob_error by using yum commands
    Install ob_error by using the OceanBase Utils installation package
    Build ob_error by compiling the source code
    Use ob_error
    General query format
    Specified query mode
    More examples
    Add error causes and solutions
    Example

    folded

    share

    ob_error is an error code parsing tool of OceanBase Database. ob_error returns the corresponding causes and solutions for each error code you entered. With ob_error, you can get basic error information without checking the documentation.

    Install ob_error

    Install ob_error by using yum commands

    You can use yum commands to directly install OceanBase Utils and then use ob_error.

    yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
    yum install oceanbase-ce-utils
    

    Install ob_error by using the OceanBase Utils installation package

    You can install OceanBase Utils and then use ob_error.

    1. Search for OceanBase Utils in the OceanBase Download Center and then download the required version to your local server.

    2. Run the following command in a file directory to install OceanBase Utils:

      rpm -ivh  oceanbase-ce-utils-<version>
      

      If you only need ob_error, run the rpm2cpio command to obtain ob_error.

      rpm2cpio oceanbase-ce-utils-<version> | cpio -idmv ./usr/bin/ob_error
      cp usr/bin/ob_error /usr/local/bin
      

    Build ob_error by compiling the source code

    You can compile the source code of OceanBase Database to build ob_error.

    1. Clone the open-source code of OceanBase Database to your local server.

      git clone https://github.com/oceanbase/oceanbase
      
    2. Compile ob_error in the following modes:

      • Debug mode

        bash build.sh debug --init
        cd build_debug
        make ob_error
        cp tools/ob_error/src/ob_error /usr/local/bin
        

        By default, after you compile ob_error, you can find the compiled files in the DEBUG_BUILD_DIR/tools/ob_error/src/ob_error directory. DEBUG_BUILD_DIR indicates the compilation directory, which is build_debug in this example.

      • Release mode

        bash build.sh release --init
        cd build_release
        make ob_error
        cp tools/ob_error/src/ob_error /usr/local/bin
        

        By default, after you compile ob_error, you can find the compiled files in the RELEASE_BUILD_DIR/tools/ob_error/src/ob_error directory. RELEASE_BUILD_DIRR indicates the compilation directory, which is build_release in this example.

    Use ob_error

    General query format

    After you enter an error code, ob_error automatically returns an error message corresponding to the operating system, Oracle mode, MySQL mode, and OceanBase Database. Here is an example:

    $ob_error 4001
    OceanBase:
        OceanBase Error Code: OB_OBJ_TYPE_ERROR(-4001)
        Message: Object type error
        Cause: Internal Error
        Solution: Contact OceanBase Support
    Oracle:
        Oracle Error Code: OBE-04001
        Message: sequence parameter must be an integer
        Related OceanBase Error Code:
            OB_ERR_SEQ_OPTION_MUST_BE_INTEGER(-4317)
    

    Specified query mode

    You can search for the error code of a specific mode by adding a prefix, also known as a facility, to the ob_error command.

    • If you add the my facility, ob_error returns an error message of OceanBase Database if the error code is not generated for an error in MySQL mode but exists in OceanBase Database. Otherwise, ob_error returns an error message in MySQL mode.

      $ob_error my 4000
      
      OceanBase:
          OceanBase Error Code: OB_ERROR(-4000)
          Message: Common error
          Cause: Internal Error
          Solution: Contact OceanBase Support
      
      $ob_error my 1210
      
      MySQL:
          MySQL Error Code: 1210 (HY000)
          Message: Invalid argument
          Message: Miss argument
          Message: Incorrect arguments to ESCAPE
          Related OceanBase Error Code:
              OB_INVALID_ARGUMENT(-4002)
              OB_MISS_ARGUMENT(-4277)
              INCORRECT_ARGUMENTS_TO_ESCAPE(-5832)
      
    • If you add the ora or pls facility, ob_error returns an error message of the Oracle mode if the error code exists in this mode.

      $ob_error ora 51
      Oracle:
          Oracle Error Code: OBE-00051
          Message: timeout occurred while waiting for a resource
          Related OceanBase Error Code:
              OB_ERR_TIMEOUT_ON_RESOURCE(-5848)
      
    • When you use the -a option in some circumstances, if the error code you enter exists in the corresponding mode, ob_error returns error messages of both OceanBase Database and the Oracle mode.

      $ob_error ora 600 -a 5727
      OceanBase:
          OceanBase Error Code: OB_ERR_PROXY_REROUTE(-5727)
          Message: SQL request should be rerouted
          Cause: Internal Error
          Solution: Contact OceanBase Support
      Oracle:
          Oracle Error Code: OBE-00600
          Message: internal error code, arguments: -5727, SQL request should be rerouted
          Related OceanBase Error Code:
              OB_ERR_PROXY_REROUTE(-5727)
      

      Note

      You can use the -a option to locate the OBE-00600 error with variables. The OBE-00600 error is an internal error of Oracle.

    More examples

    For more test cases, see expect_result.

    You can also run the --help command to get a complete user guide.

    ob_error --help
    

    Add error causes and solutions

    Note

    This section can be used by developers for reference.

    This section describes how to add error causes and solutions for the reference of developers.

    Example

    The error code 4000 in the src/oberror_errno.def file is defined as follows:

    DEFINE_ERROR(OB_ERROR, -4000, -1, "HY000", "Common error");
    

    To add causes and solutions, you can redefine it as follows:

    DEFINE_ERROR(OB_ERROR, -4000, -1, "HY000", "Common error", "CAUSE", "SOLUTION");
    

    Run the following command to regenerate src/lib/ob_errno.h, src/share/ob_errno.h, and src/share/ob_errno.cpp:

    cd src/share
    ./gen_errno.pl
    

    Recompile ob_error in the BUILD_DIR directory.

    Previous topic

    ob-operator
    Last

    Next topic

    obdiag
    Next
    What is on this page
    Install ob_error
    Install ob_error by using yum commands
    Install ob_error by using the OceanBase Utils installation package
    Build ob_error by compiling the source code
    Use ob_error
    General query format
    Specified query mode
    More examples
    Add error causes and solutions
    Example