Tuesday, January 29, 2013

Objects Unable to Extend


Objects UNABLE TO EXTEND

col owner format a15
col segment_name format a25
col partition_name format a20
select owner,
       segment_name,
       segment_type,
       partition_name,
       a.tablespace_name,
       next_extent,
       max_extents,
       extents
  from dba_segments a
 where extents = max_extents
 union
select owner,
       segment_name,
       segment_type,
       partition_name,
       b.tablespace_name,
       next_extent,
       max_extents,
       extents
  from dba_segments b
 where next_extent > (select max(bytes)
                        from dba_free_space
                       where b.tablespace_name = tablespace_name)
 union
select owner,
       segment_name,
       segment_type,
       partition_name,
       c.tablespace_name,
       next_extent,
       max_extents,
       extents
  from dba_segments c
 where not exists (select tablespace_name
                     from dba_free_space
                    where c.tablespace_name = tablespace_name)
 order by tablespace_name
/

No comments:

Post a Comment