USER_RECYCLEBIN

2025-12-04 07:10:02  Updated

Purpose

This view displays information about the recycle bin of the current user. The columns in this view are the same as those in the DBA_RECYCLEBIN view, except that the OWNER column is omitted.

Applicability

This view is available only in Oracle mode of OceanBase Database.

Columns

Column Type Nullable Description
OBJECT_NAME VARCHAR2(128) NO The new name of the object.
ORIGINAL_NAME VARCHAR2(128) NO The original name of the object.
OPERATION VARCHAR2(9) NO This column is not supported. The default value is NULL.
TYPE VARCHAR2(25) NO The type of the object.
TS_NAME VARCHAR2(30) NO The name of the table to which the object belongs.
CREATETIME VARCHAR2(19) NO The time when the object was created.
DROPTIME VARCHAR2(19) NO The time when the object was moved to the recycle bin.
DROPSCN NUMBER NO This column is not supported. The default value is NULL.
PARTITION_NAME VARCHAR2(128) NO This column is not supported. The default value is NULL.
CAN_UNDROP VARCHAR2(3) NO Indicates whether the object can be restored from the recycle bin:
  • YES
  • NO
  • CAN_PURGE VARCHAR2(3) NO Indicates whether the object can be purged:
  • YES
  • NO
  • RELATED NUMBER NO This column is not supported. The default value is NULL.
    BASE_OBJECT NUMBER NO This column is not supported. The default value is NULL.
    PURGE_OBJECT NUMBER NO This column is not supported. The default value is NULL.
    SPACE NUMBER NO This column is not supported. The default value is NULL.

    Sample query

    Query the recycle bin objects of the current user.

    obclient [SYS]> SELECT * FROM SYS.USER_RECYCLEBIN;
    

    The query result is as follows:

    +----------------------------------+------------------------+-----------+--------------+---------+---------------------+---------------------+---------+----------------+------------+-----------+---------+-------------+--------------+-------+
    | OBJECT_NAME                      | ORIGINAL_NAME          | OPERATION | TYPE         | TS_NAME | CREATETIME          | DROPTIME            | DROPSCN | PARTITION_NAME | CAN_UNDROP | CAN_PURGE | RELATED | BASE_OBJECT | PURGE_OBJECT | SPACE |
    +----------------------------------+------------------------+-----------+--------------+---------+---------------------+---------------------+---------+----------------+------------+-----------+---------+-------------+--------------+-------+
    | RECYCLE_$_10001_1740730875608288 | TBL2                   | NULL      | TABLE        | NULL    | 28-FEB-25 04.20.35. | 28-FEB-25 04.21.15. |    NULL | NULL           | YES        | YES       |    NULL |        NULL |         NULL |  NULL |
    | RECYCLE_$_10001_1740730875608272 | __idx_500005_TBL2_IDX1 | NULL      | NORMAL INDEX | NULL    | 28-FEB-25 04.20.42. | 28-FEB-25 04.21.15. |    NULL | NULL           | YES        | YES       |    NULL |        NULL |         NULL |  NULL |
    +----------------------------------+------------------------+-----------+--------------+---------+---------------------+---------------------+---------+----------------+------------+-----------+---------+-------------+--------------+-------+
    2 rows in set
    

    References

    Contact Us