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)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- -----------------------------------------------------------------------------------
-- 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

General Comments(0)

Tip: Click on a line number in the code to add a line-specific comment

No general comments yet. Be the first to comment!