What is the Recycle Bin?

What is the Recycle Bin?

5 Agosto 2016 Oracle Database 0

The recycle bin is a data dictionary table containing information about dropped objects. Dropped tables and any associated objects such as indexes, constraints, nested tables, and the likes are not removed and still occupy space.
Enabling and Disabling the Recycle Bin
ALTER SESSION SET recyclebin = OFF;
ALTER SYSTEM SET recyclebin = OFF;
ALTER SESSION SET recyclebin = ON;
ALTER SYSTEM SET recyclebin = ON;
An example of recovery:
drop table SALARY2016;
select object_name,original_name,type,can_undrop as “undo”,can_purge as “PUR”, droptime
from dba_recyclebin where original_name like SALARY%’ order by droptime;
OBJECT_NAME ORIGINAL_NAME TYPE undo PUR DROPTIME
BIN$JZgAyoU+u1DgUxQVCApelQ==$0 SALARY2016 TABLE YES YES 2016-08-04:13:39:27
flashback table “BIN$JZgAyoU+u1DgUxQVCApelQ==$0” to before drop;
Restoring Dependent objects:
select index_name from dba_indexes where table_name=’SALARY2016’’;
INDEX_NAME
—————
BIN$JZgAyoU9u1DgUxQVCApelQ==$0
alter index “BIN$JZgAyoU9u1DgUxQVCApelQ==$0” rename to IDX_ID_PK;
Users can purge the recycle bin of their own objects, and release space for objects
PURGE RECYCLEBIN;

 

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *