| Script Name |
Description |
c_unused.sql |
This script used to get the space usage (High-water mark)
for TABLE, INDEX or CLUSTER
The high-water mark for a table is the difference between the
TOTAL_BLOCKS value and UNUSED_BYTES value returned by this procedure call.
The UNUSED_BLOCKS value represents the number of blocks above
the high-water mark, the TOTAL_BLOCKS value reflects the total
number of blocks allocated to the table
After executing this script you can reclaim space from a TABLE
For example:
TOTAL_BLOCKS = 200
UNUSED_BLOCKS = 100
if the database BLOCK size = 4K, then 100 blocks--400K--could be reclaimed
if you want to leave 20 blocks within the table as unused space above the
high-water mark, you can alter the table, specifying that the database
keep 20 blocks--80K:
SQL> alter table deallocate unused keep 80K,
|
c_user_alter_quota.sql |
This script will:
1. REVOKE UNLIMITED TABLESPACE FROM
all NON DBA users (DESIGNER and
SYS likes are excluded).
2. Limit their quotas based on the
current usage.
|
s_db_seg_where.sql |
THIS Script reports table or index extent maping by datafile.
|
s_db_segs1.sql |
Reports largest segment types by owner
|
s_db_segs2.sql |
USE s_db_segs3.sql for a detailed report of segments
Reports SUM(bytes) for all segments by owner groupping them by
the current size from dba_segments.
There is a theory by which you only need 3 types
of tablespaces:
160k (SMALL)
5MBm (MEDIUM)
160MB (LARGE)
If you follow this theory you can use this script
to "place" your segments in the "right" tablespace:
1. 160K ts (segs < 5MB)
2. 5MB ts (segs < 160MB)
3. 160MB ts (segs > 160MB)
|
s_db_segs_all.sql |
This script gives general idea of segments and extents
in a database for all the tablespaces
|
s_db_segs_blowout.sql |
THIS Script reports segments that will "blowout"
on the next extent.
|
s_db_segs_map.sql |
THIS Script display top N extents map of a tablespace
Example:
========
Display top 10 extents map of
SYSTEM tablespace file_id 153:
------------------------------
SQL> s_db_segs_map.sql SYSTEM 153 10
|
s_tabsp_top_10_segs.sql |
Displays top 10 biggest segments by tablespace
WARNING:
Uses ORDER BY with INLINE VIEWS not supported for <8i
|