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

    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.2.1
    iconOceanBase Database
    SQL - V 4.2.1
    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

    View objects in the recycle bin

    Last Updated:2026-04-28 09:23:26  Updated
    Share
    What is on this page
    Considerations
    Background information
    Procedure
    References

    folded

    Share

    You can execute the SHOW RECYCLEBIN statement to query for objects in the recycle bin.

    Considerations

    You can delete tenants only in the sys tenant. Therefore, MySQL and Oracle user tenants can be moved only to the recycle bin of the sys tenant after they are dropped. In the sys tenant, you can view databases, tables, and indexes of the current tenant as well as those of all other tenants in the recycle bin. In a MySQL user tenant, you can view only databases, tables, and indexes in the recycle bin. In an Oracle user tenant, you can view only tables and indexes in the recycle bin.

    Background information

    When you drop a database object or tenant:

    • If the recycle bin is enabled, the object is moved to the recycle bin and can be viewed in the recycle bin.

    • If the recycle bin is disabled, the object is not moved to the recycle bin and cannot be viewed in the recycle bin.

    Procedure

    1. Log on to the database as an administrator of the sys tenant or a user tenant.

      Note

      • The administrator user of a MySQL user tenant is root and that of an Oracle user tenant is SYS.
      • If you want to view tenants in the recycle bin, log on to the database as an administrator of the sys tenant.

      Note that you must specify the corresponding fields in the following sample code based on your actual database configurations.

      obclient -h10.xx.xx.xx -P2883 -uroot@sys -p***** -A
      

      For more information about how to connect to a database, see Overview (MySQL mode) or Overview (Oracle mode).

    2. Execute the following statement to view the objects in the recycle bin.

      obclient [(none)]> SHOW RECYCLEBIN;
      +-------------------------------------+-------------------+--------+----------------------------+
      | OBJECT_NAME                         | ORIGINAL_NAME     | TYPE   | CREATETIME                 |
      +-------------------------------------+-------------------+--------+----------------------------+
      | RECYCLE_$_100017_1672050541224936   | oracle001         | TENANT | 2023-01-16 11:01:40.258000 |
      | __recycle_$_100017_1673426335319344 | __idx_500788_idx1 | INDEX  | 2023-01-11 16:38:55.318878 |
      | __recycle_$_100017_1673426335329040 | __idx_500788_idx2 | INDEX  | 2023-01-11 16:38:55.328312 |
      | __recycle_$_100017_1673426335331800 | t1                | TABLE  | 2023-01-11 16:38:55.331481 |
      +-------------------------------------+-------------------+--------+----------------------------+
      4 rows in set
      

      The parameters in the returned result are described as follows:

      • OBJECT_NAME indicates the name of an object in the recycle bin.

      • ORIGINAL_NAME indicates the original name of the object.

      • TYPE indicates the type of the object in the recycle bin.

        • sys tenant: INDEX, TABLE, DATABASE, and TENANT. In this example, oracle001 is a tenant object in the recycle bin.

        • MySQL user tenants: INDEX, TABLE, and DATABASE.

        • Oracle user tenants: INDEX and TABLE.

      • CREATETIME indicates the time when the object was placed in the recycle bin.

    References

    For more information about the recycle bin, see the following topics:

    • Overview

    • Enable or disable the recycle bin

    • Restore objects from the recycle bin

    • Purge the recycle bin

    Previous topic

    Enable or disable the recycle bin
    Last

    Next topic

    Restore objects from the recycle bin
    Next
    What is on this page
    Considerations
    Background information
    Procedure
    References