What is the Recycle Bin?

Il cestino è una tabella del dizionario dati contenente informazioni sugli oggetti rilasciati. Le tabelle eliminate e tutti gli oggetti associati come indici, vincoli, tabelle nidificate e simili non vengono rimossi e occupano ancora spazio.

Abilitazione e disabilitazione del cestino

ALTER SESSION SET recyclebin = OFF;
ALTER SYSTEM SET recyclebin = OFF;
ALTER SESSION SET recyclebin = ON;
ALTER SYSTEM SET recyclebin = ON;

Un esempio di recupero:

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;

Potrebbero interessarti anche...

Lascia un commento

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