denrepo

OracleObjects & schema

Recycle bin contents by owner

Dropped objects still taking up space. Oracle reclaims it under space pressure, but a large recycle bin can make tablespace reports look worse than they are.

Not yet verified. How scripts are tested

ora-recyclebin.sql
1CLEAR COLUMNS2SET LINESIZE 100 PAGESIZE 100 TRIMOUT ON TAB OFF3COLUMN owner   FORMAT A254COLUMN objects FORMAT 999,9905COLUMN mb      HEADING "MB" FORMAT 9,999,9906 7SELECT owner,8       COUNT(*) AS objects,9       ROUND(SUM(space) * (SELECT TO_NUMBER(value) FROM v$parameter WHERE name = 'db_block_size') / 1048576) AS mb10FROM dba_recyclebin11GROUP BY owner12ORDER BY mb DESC;

Save it as ora-recyclebin.sql and run it with SQL> @ora-recyclebin.

Open in denrepo

Part of these runbooks

More Oracle scripts: Objects & schema