How To Drop / Delete / Purge Recyclebin or DBA_RECYCLBIN For Objects Older Than x Days/minutes or selective purge of objects from recycle bin (Doc ID 1596147.1)

Last updated on AUGUST 07, 2016

Applies to:

Oracle Database - Standard Edition - Version 11.2.0.3 and later
Information in this document applies to any platform.

Goal

How to purge DBA_RECYCLBIN for objects older than x days/minutes? or do we have RECYCLEBIN RETENTION feature or truncate recyclebin ?

--------------------------------------------------------------------------------------

DBA_RECYCLEBIN has a column called DROPTIME.

But we can not use the below queries to purge or delete the recyclebin objects older than 7 days

DELETE from DBA_RECYCLEBIN where droptime<sysdate-7;  (wrong do not use)

PURGE DBA_RECYCLEBIN where droptime<sysdate-7;  (wrong do not use)

 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms