Oracle Recycle Bin Contents Report
Displays objects currently stored in the Oracle recycle bin, including original names, object types, and space usage. Useful for monitoring dropped objects and managing reclaimable space.
oraclesqlmaintenance-cleanupv1.0.0
0 stars0 downloads14 views0 comments
By OracleDba • Created
Code
(23 lines)1234567891011121314151617181920212223
-- -----------------------------------------------------------------------------------
-- File Name : https://oracle-base.com/dba/monitoring/recyclebin.sql
-- Author : Tim Hall
-- Description : Displays the contents of the recyclebin.
-- Requirements : Access to the DBA views. Depending on DB version, different columns
-- are available.
-- Call Syntax : @recyclebin (owner | all)
-- Last Modified: 15/07/2010
-- -----------------------------------------------------------------------------------
SET LINESIZE 500 VERIFY OFF
SELECT owner,
original_name,
object_name,
operation,
type,
space AS space_blks,
ROUND((space*8)/1024,2) space_mb
FROM dba_recyclebin
WHERE owner = DECODE(UPPER('&1'), 'ALL', owner, UPPER('&1'))
ORDER BY 1, 2;
SET VERIFY ON