首页 > 数据库 > Oracle > How to purge recycle bin
If you decide that you are never going to restore an item from the recycle bin, you can use the PURGE statement to remove the items and their associated objects from the recycle bin and release their storage space. You need the same privileges as if you were dropping the item.
When you use the PURGE statement to purge a table, you can use the name that the
table is known by in the recycle bin or the original name of the table. The following
hypothetical example purges the table hr.int_admin_emp, which was renamed to
BIN$jsleilx392mk2=293$0 when it was placed in the recycle bin:
PURGE TABLE "BIN$jsleilx392mk2=293$0";
You can achieve the same result with the following statement:
PURGE TABLE int_admin_emp;
You can use the PURGE statement to purge all the objects in the recycle bin that are from
a specified tablespace or only the tablespace objects belonging to a specified user, as
shown in the following examples:
PURGE TABLESPACE example;
PURGE TABLESPACE example USER oe;
Users can purge the recycle bin of their own objects, and release space for objects, by
using the following statement:
PURGE RECYCLEBIN;
If you have the SYSDBA privilege or the PURGE DBA_RECYCLEBIN system privilege, then
you can purge the entire recycle bin by specifying DBA_RECYCLEBIN, instead of
RECYCLEBIN in the previous statement.
PURGE DBA_RECYCLEBIN;
You can also use the PURGE statement to purge an index from the recycle bin or to purge from the recycle bin all objects in a specified tablespace.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25521690/viewspace-2123250/ ,如需转载,请注明出处,否则将追究法律责任。