Ispirer Website Ispirer Toolkit Overview Free Trial

Why Does a Bunch of Invalid Objects with Garbage Names Appear in Oracle

Prior to Oracle 10g, a DROP command permanently removed objects from the database. In Oracle 10g a DROP command places the object in the recycle bin. The extents allocated to the segment are not reallocated until you purge the object. You can restore the object from the recycle bin at any time.

A recycle bin contains all the dropped database objects until,

The usage of recycle bin can be turned on/off this way:

ALTER SESSION SET recyclebin = ON/OFF; -- for the current session
ALTER SYSTEM SET recyclebin = ON/OFF;  -- for all sessions

You can view the dropped objects in the recycle bin from two dictionary views:

For example you drop your table:

DROP TABLE drop_test;

Now you see the table with strange name like “BIN$njeSgciWSy+6io3ZQS+Bug==$0

It is your table but with the new name. You even can see it content using:

SELECT * FROM "BIN$njeSgciWSy+6io3ZQS+Bug==$0"

To reinstate the table please use this command:

FLASHBACK TABLE drop_test TO BEFORE DROP;

Now you can see the latest version of your table again.

If you want to drop table permanently you should use:

DROP TABLE drop_test PURGE;

And to empty all users recycle bin command

PURGE RECYCLEBIN;

should be used.

NOTE: All triggers for the dropped table are also put into recycle bin and their names are changed in the same way.