Database Reference
In-Depth Information
By adding PURGE to the end of the DROP command, you make the table drop bypass the
Recycle Bin altogether. It will not be recoverable, so proceed with caution.
To purge objects that already reside in the Recycle Bin, you have several options. First,
you can purge a specific table, as shown:
SQL> purge table employees;
Table purged.
When purging a single table, you can reference the table by using either the original
table name or the system-assigned name. If you use the system-assigned name, be sure to
use double quotes around the name.
You can also purge all objects from a specific tablespace by using the TABLESPACE option,
as shown:
SQL> purge tablespace user_data;
Tablespace purged.
You can also purge the entire Recycle Bin (all objects you have dropped, regardless of
tablespace), as shown here:
SQL> purge recyclebin;
Recyclebin purged.
This command will purge all of the objects from the Recycle Bin. By the same token, a
DBA can purge all of the objects from all users' Recycle Bins at once using the following:
SQL> purge dba_recyclebin;
DBA Recyclebin purged.
There may also be times when Oracle itself will purge objects from the Recycle Bin. This
will occur when Oracle can no longer allocate new extents in a tablespace where the dropped
objects reside without extending the tablespace. This is referred to as space pressure . Before
extending the tablespace, Oracle will choose to purge Recycle Bin objects.
When space pressure occurs, Oracle will purge the oldest objects first, and it will purge
dependent objects (in other words, indexes and triggers) before purging the table itself.
Because of the threat of space pressure, objects in the Recycle Bin are not guaranteed to
be recoverable.
In Exercise 8.1, you'll purge a table from the Recycle Bin.
Search WWH ::




Custom Search