2026-03-12 20:23:15
This commit is contained in:
16
vg/spacebound.sql
Normal file
16
vg/spacebound.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
-- To identify space-bound objects. If all is well, no rows are returned.
|
||||
-- If any space-bound objects are found, look at value of NEXT extent
|
||||
-- size to figure out what happened.
|
||||
-- Then use coalesce (alter tablespace <foo> coalesce;).
|
||||
-- Lastly, add another datafile to the tablespace if needed.
|
||||
--
|
||||
-- 11/30/98
|
||||
|
||||
SELECT a.table_name, a.next_extent, a.tablespace_name
|
||||
FROM all_tables a,
|
||||
( SELECT tablespace_name, max(bytes) as big_chunk
|
||||
FROM dba_free_space
|
||||
GROUP BY tablespace_name ) f
|
||||
WHERE f.tablespace_name = a.tablespace_name
|
||||
AND a.next_extent > f.big_chunk
|
||||
/
|
||||
Reference in New Issue
Block a user