Skip to content

DBMS RECYCLEBIN

DBMS_RECYCLEBIN Package#

The DBMS_RECYCLEBIN package allows the user to completely eliminate a table that was dropped and moved to the recycle bin. This feature is provided as a system-defined stored package.

DBMS_RECYCLEBIN Procedures and Functions#

The DBMS_RECYCLEBIN package consists of the following procedures and functions.

Procedures/Functions Description
PURGE_USER_RECYCLEBIN Drops tables in the recycle bin from the system, for each user.
PURGE_ALL_RECYCLEBIN Drops all tables in the recycle bin.
PURGE_TABLESPACE Drops all tables from the specified tablespace.
PURGE_ORIGINAL_NAME Drop all duplicate tables in the recycle bin, by the name they had before they were moved.

DBMS_RECYCLEBIN properties can be set in altibase.properties.

  • RECYCLEBIN_DISK_MAX_SIZE

  • RECYCLEBIN_MEM_MAX_SIZE

  • RECYCLEBIN_ENABLE

For more detailed information, please refer to the General Reference.

PURGE_USER_RECYCLEBIN#

PURGE_USER_RECYCLEBIN completely eliminates tables in the recycle bin from the database system, for each user

Syntax#

EXEC DBMS_RECYCLEBIN.PURGE_USER_RECYCLEBIN;

Example#

Drop the tables in the recycle bin that were moved to the recycle bin by the user who is currently connected.

EXEC DBMS_RECYCLEBIN.PURGE_USER_RECYCLEBIN;

PURGE_ALL_RECYCLEBIN#

PURGE_ALL_RECYCLEBIN drops all tables in the recycle bin from the database system.

Syntax#

EXEC DBMS_RECYCLEBIN.PURGE_ALL_RECYCLEBIN;

Example#

Drop all tables from the recycle bin.

EXEC DBMS_RECYCLEBIN.PURGE_ALL_RECYCLEBIN;

PURGE_TABLESPACE#

PURGE_TABLESPACE drops all specified tables in the recycle bin from the system.

Syntax#

EXEC DBMS_RECYCLEBIN.PURGE_TABLESPACE(
  tablespace_name IN VARCHAR(64));

Parameter#

Name In/Output Data Type Description
tablespace_name IN VARCHAR(64) The tablespace name

Example#

Drop the tables that exist in the TBS_DISK_DATA tablespace from the recycle bin.

EXEC DBMS_RECYCLEBIN.PURGE_TABLESPACE('TBS_DISK_DATA');

PURGE_ORIGINAL_NAME#

Drops tables from the recycle bin by the names the tables had before they were dropped. Tables with identical names can be dropped several times, and dropped all at once from the recycle bin.

Syntax#

EXEC DBMS_RECYCLEBIN.PURGE_ORIGINAL_NAME(
  original_table_name IN VARCHAR(128));

Parameter#

Name In/Output Data Type Description
original_table_name IN VARCHAR(128) The name of the table before it was dropped.

Example#

Drop all tables that had the name 'TABLE1' before they were dropped, from the system.

EXEC DBMS_RECYCLEBIN.PURGE_ORIGINAL_NAME('TABLE1');