Is there any possibility to restore the accidently removed objects from oracle?
Yes, we can restore the accidently removed table in oracle from recyclebin. The followings are the sql statements related that.
By issueing this command, it will restore the dropped objects from the recycle bin.
FLASHBACK TABLE tablename TO BEFORE DROP
We can see the dropped objects which is existing in the recycle bin.
Example : SELECT * FROM RECYCLEBIN
It gives the OBJECT_NAME, ORIGINAL_NAME, OPERATION, TYPE, CREATETIME, DROPTIME, CAN_UNDROP, CAN_PURGE and other details.
PURGE
If we add the word purge in drop statement, we can't restore from recycle bin
Example : DROP TABLE test PURGE
While dropping time the object is moved to recyclebin with another temporary name also. So we can drop the object from the recyclebin also by giving original table name or temporary name
Examples:
PURGE TABLE test
PURGE TABLE BIN$ayuHuFUURfWck+2mVD6jTg==$0 — recyclebinname
PURGE INDEX idxname – index only
PURGE TABLESPACE tblspname
PURGE RECYCLEBIN
If we issueing this command it will delete all contents in the recycle bin. So we cannot restore tables and other objects after issueing this command.