PURGE RECYCLEBIN

When the recyclebin is enabled (RECYCLEBIN=ON), any tables that you drop do not get fully deleted, instead, they are moved to the RecycleBin. The PURGE command allows you to empty the recyclebin. This feature was first introduced in Oracle 10g.

Syntax:

   PURGE RECYCLEBIN

   PURGE DBA_RECYCLEBIN

   PURGE USER_RECYCLEBIN

   PURGE TABLE TableName

Purging from all users recyclebins (using DBA_RECYCLEBIN) requires DBA privileges.

Examples

Drop a table, bypassing the recyclebin:

drop table SS64 purge;

Disable the recyclebin for this session:

ALTER SESSION SET RECYCLEBIN=OFF;

If using a 9i client against a 10g database, the client won't know what purge is, so use execute immediate:

begin
execute immediate 'purge recyclebin';
end;

More examples from OraFAQ

Related:

FLASHBACK TABLE - Restore a Table

DBA_RECYCLEBIN   USER_RECYCLEBIN


© Copyright SS64.com 1999-2013
Some rights reserved