hoe to find free extents
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: hoe to find free extents

  1. #1
    Join Date
    Aug 2000
    Posts
    32
    Hi guys,
    How to find used extents,free extents in a table.can anyone please help me ASAP.

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    rephrase your question, it does not make sense

    although I suspect we have some concepts problems here

  3. #3
    Join Date
    Aug 2000
    Posts
    32

    how to fine free extents

    hi pando,
    I want to find the no of available extents in a table.for ex. i allocate 121 extents .out of this how much extents has been used and how much is free.help me.

  4. #4
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    look dba_segments for number of extents

    you said you allocate 121 extents, did you use minextents 121?

    if that is the case you have to use dbms_space package to find freespace

  5. #5
    Join Date
    Aug 2000
    Posts
    32

    To pando

    Hi,
    Most of the time I am getting error like this for table Max .extents reached for table.That's y i plan to find used extents and free extents for a table.reply IMMEIATELY

  6. #6
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,001
    select t1.owner,t1.tablespace_name,t1.table_name,t1.initial_extent/1024 init_extK,
    t1.next_extent/1024 Next_ExtK,
    t1.max_extents,count(*) from dba_tables t1, dba_extents t2
    where t1.owner=t2.owner and t1.table_name=t2.segment_name
    group by t1.owner,t1.tablespace_name,t1.table_name,t1.initial_extent,
    t1.next_extent,t1.max_extents
    order by t1.owner,t1.table_name
    /
    select t1.owner,t1.tablespace_name,t1.index_name,t1.initial_extent/1024 init_extK,
    t1.next_extent/1024 Next_ExtK,
    t1.max_extents,count(*) from dba_indexes t1, dba_extents t2
    where t1.owner=t2.owner and t1.index_name=t2.segment_name
    group by t1.owner,t1.tablespace_name,t1.index_name,t1.initial_extent,t1.next_extent,
    t1.max_extents
    order by t1.owner,t1.index_name
    /
    select t1.tablespace_name, t1.segment_name, t1.initial_extent/1024 init_extK,
    t1.next_extent/1024 Next_ExtK, t1.max_extents, t1.status, Count(*)
    from dba_rollback_segs t1,
    dba_extents t2
    where t1.segment_name = t2.segment_name
    group by t1.tablespace_name, t1.segment_name,t1.initial_extent,t1.next_extent,
    t1.max_extents,t1.status
    /

    Look for places where count(*) = t1.max_extents.

  7. #7
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    hm why would someone count extents from dba_extents when you have an extents column in dba_segments...

  8. #8
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,001
    I didn't write the script. Perhaps there is a more efficient script that Venkattr could use. But the selects do work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width