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.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 & 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.4.2
    iconOceanBase Database
    SQL - V 4.4.2
    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

    View the archiving history

    Last Updated:2026-04-02 06:23:56  Updated
    share
    What is on this page
    View the archiving history of all tenants from the sys tenant
    View the archiving history of a user tenant

    folded

    share

    You can query views for the archiving history, including the information about ongoing archiving jobs.

    View the archiving history of all tenants from the sys tenant

    You can query the oceanbase.CDB_OB_ARCHIVELOG_SUMMARY view from the sys tenant for the archiving history of all tenants in the cluster.

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

    2. Execute the following statement to view the archiving history of all tenants in the cluster:

      obclient [(none)]> SELECT * FROM oceanbase.CDB_OB_ARCHIVELOG_SUMMARY\G
      *************************** 1. row ***************************
                         TENANT_ID: 1002
                           DEST_ID: 1002
                          ROUND_ID: 2
                       INCARNATION: 1
                           DEST_NO: 0
                            STATUS: DOING
                         START_SCN: 1655697600000000000
                 START_SCN_DISPLAY: 2022-06-20 12:00:00.000000
                    CHECKPOINT_SCN: 1655769600000000000
            CHECKPOINT_SCN_DISPLAY: 2022-06-21 08:00:00.000000
                        COMPATIBLE: 1
                     BASE_PIECE_ID: 4
                     USED_PIECE_ID: 4
             PIECE_SWITCH_INTERVAL: 1d
                       INPUT_BYTES: 16106127360
               INPUT_BYTES_DISPLAY: 15.00GB
                      OUTPUT_BYTES: 16106127360
              OUTPUT_BYTES_DISPLAY: 15.00GB
                 COMPRESSION_RATIO: 1.00
               DELETED_INPUT_BYTES: 0
       DELETED_INPUT_BYTES_DISPLAY: 0.00MB
              DELETED_OUTPUT_BYTES: 0
      DELETED_OUTPUT_BYTES_DISPLAY: 0.00MB
                           COMMENT:
                              PATH: file:///data/nfs/backup/archive
      *************************** 2. row ***************************
                         TENANT_ID: 1002
                           DEST_ID: 1002
                          ROUND_ID: 1
                       INCARNATION: 1
                           DEST_NO: 0
                            STATUS: STOP
                         START_SCN: 1654034400000000000
                 START_SCN_DISPLAY: 2022-06-01 06:00:00.000000
                    CHECKPOINT_SCN: 1654228800000000000
            CHECKPOINT_SCN_DISPLAY: 2022-06-03 12:00:00.000000
                        COMPATIBLE: 1
                     BASE_PIECE_ID: 1
                     USED_PIECE_ID: 3
             PIECE_SWITCH_INTERVAL: 1d
                       INPUT_BYTES: 96636764160
               INPUT_BYTES_DISPLAY: 90.00GB
                      OUTPUT_BYTES: 96636764160
              OUTPUT_BYTES_DISPLAY: 90.00GB
                 COMPRESSION_RATIO: 1.00
               DELETED_INPUT_BYTES: 26843545600
       DELETED_INPUT_BYTES_DISPLAY: 25.00GB
              DELETED_OUTPUT_BYTES: 26843545600
      DELETED_OUTPUT_BYTES_DISPLAY: 25.00GB
                           COMMENT:
                              PATH: file:///data/nfs/backup/archive
      *************************** 3. row ***************************
                         TENANT_ID: 1004
                           DEST_ID: 1001
                          ROUND_ID: 1
                       INCARNATION: 1
                           DEST_NO: 0
                            STATUS: DOING
                         START_SCN: 1655658000000000000
                 START_SCN_DISPLAY: 2022-06-20 01:00:00.000000
                    CHECKPOINT_SCN: 1655769600000000000
            CHECKPOINT_SCN_DISPLAY: 2022-06-21 08:00:00.000000
                        COMPATIBLE: 1
                     BASE_PIECE_ID: 1
                     USED_PIECE_ID: 2
             PIECE_SWITCH_INTERVAL: 1d
                       INPUT_BYTES: 161061273600
               INPUT_BYTES_DISPLAY: 150.00GB
                      OUTPUT_BYTES: 161061273600
              OUTPUT_BYTES_DISPLAY: 150.00GB
                 COMPRESSION_RATIO: 1.00
               DELETED_INPUT_BYTES: 0
       DELETED_INPUT_BYTES_DISPLAY: 0.00MB
              DELETED_OUTPUT_BYTES: 0
      DELETED_OUTPUT_BYTES_DISPLAY: 0.00MB
                           COMMENT:
                              PATH: oss://oceanbase-test-bucket/backup/archive?host=xxx.aliyun-inc.com
      3 row in set
      

    In the preceding example, the current cluster contains two tenants with the IDs 1002 and 1004. For tenant 1002, log archiving is enabled the second time and information about two rounds of archiving exists. For tenant 1004, log archiving is enabled the first time and only information about the current round of archiving exists.

    For tenant 1002, logs whose SCNs fall within the range of '2022-06-01 06:00:00.000000' to '2022-06-03 12:00:00.000000' are archived during the first round of archiving, generating three pieces with the piece IDs 1 to 3. The amount of archived log data is 90 GB.

    round_id of tenant 1004 is 1, indicating that log archiving is enabled the first time. The archive destination type is Alibaba Cloud Object Storage Service (OSS), the bucket is oceanbase-test-bucket, and the archive path is /backup/archive. Two pieces with the piece IDs 1 and 2 have been generated since log archiving is enabled. Logs whose system change numbers (SCNs) fall within the range of '2022-06-20 01:00:00.000000' to '2022-06-21 08:00:00.000000' are archived.

    For more information about the CDB_OB_ARCHIVELOG_SUMMARY view, see CDB_OB_ARCHIVELOG_SUMMARY.

    View the archiving history of a user tenant

    User tenants can query the oceanbase.DBA_OB_ARCHIVELOG_SUMMARY view (MySQL-compatible mode) or the sys.DBA_OB_ARCHIVELOG_SUMMARY view (Oracle-compatible mode) for the archiving history of the tenant.

    1. Log in to the database as an administrator of a user tenant.

      Note

      In MySQL-compatible mode, the administrator user is the root user, and in Oracle-compatible mode, the administrator user is the SYS user.

    2. View the log archiving history of the current tenant.

      The following is an example of viewing the log archiving history of a MySQL-compatible tenant:

      obclient [(none)]> SELECT * FROM oceanbase.DBA_OB_ARCHIVELOG_SUMMARY\G
      *************************** 1. row ***************************
                           DEST_ID: 1002
                          ROUND_ID: 2
                       INCARNATION: 1
                           DEST_NO: 0
                            STATUS: DOING
                         START_SCN: 1655697600000000000
                 START_SCN_DISPLAY: 2022-06-20 12:00:00.000000
                    CHECKPOINT_SCN: 1655769600000000000
            CHECKPOINT_SCN_DISPLAY: 2022-06-21 08:00:00.000000
                        COMPATIBLE: 1
                     BASE_PIECE_ID: 4
                     USED_PIECE_ID: 4
             PIECE_SWITCH_INTERVAL: 1d
                       INPUT_BYTES: 16106127360
               INPUT_BYTES_DISPLAY: 15.00GB
                      OUTPUT_BYTES: 16106127360
              OUTPUT_BYTES_DISPLAY: 15.00GB
                 COMPRESSION_RATIO: 1.00
               DELETED_INPUT_BYTES: 0
       DELETED_INPUT_BYTES_DISPLAY: 0.00MB
              DELETED_OUTPUT_BYTES: 0
      DELETED_OUTPUT_BYTES_DISPLAY: 0.00MB
                           COMMENT:
                              PATH: file:///data/nfs/backup/archive
      *************************** 2. row ***************************
                           DEST_ID: 1002
                          ROUND_ID: 1
                       INCARNATION: 1
                           DEST_NO: 0
                            STATUS: STOP
                         START_SCN: 1654034400000000000
                 START_SCN_DISPLAY: 2022-06-01 06:00:00.000000
                    CHECKPOINT_SCN: 1654228800000000000
            CHECKPOINT_SCN_DISPLAY: 2022-06-03 12:00:00.000000
                        COMPATIBLE: 1
                     BASE_PIECE_ID: 1
                     USED_PIECE_ID: 3
             PIECE_SWITCH_INTERVAL: 1d
                       INPUT_BYTES: 96636764160
               INPUT_BYTES_DISPLAY: 90.00GB
                      OUTPUT_BYTES: 96636764160
              OUTPUT_BYTES_DISPLAY: 90.00GB
                 COMPRESSION_RATIO: 1.00
               DELETED_INPUT_BYTES: 32212254720
       DELETED_INPUT_BYTES_DISPLAY: 30.00GB
              DELETED_OUTPUT_BYTES: 32212254720
      DELETED_OUTPUT_BYTES_DISPLAY: 30.00GB
                           COMMENT:
                              PATH: file:///data/nfs/backup/archive
      2 row in set
      

    Previous topic

    View the archiving progress
    Last

    Next topic

    View archiving parameter settings
    Next
    What is on this page
    View the archiving history of all tenants from the sys tenant
    View the archiving history of a user tenant