DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: table/tablespace usage

  1. #1
    Join Date
    Nov 2000
    Posts
    245

    does anyone have a sql script to show the usage of table and tablespace (total, used, free)

    thanks in advance

  2. #2
    Join Date
    Sep 2000
    Posts
    362
    select
    2 b.file_id "file#",
    3 b.tablespace_name "Tablespace name",
    4 b.bytes "#Bytes",
    5 (b.bytes-sum(nvl(a.bytes,0)))"#used",
    6 sum(nvl(a.bytes,0))"#free",
    7 (sum(nvl(a.bytes,0))/(b.bytes))*100"%Free"
    8 from sys.dba_free_space a,sys.dba_data_files b
    9 where a.file_id(+)=b.file_id
    10 group by b.tablespace_name ,b.file_id,b.bytes
    11 order by b.tablespace_name;


    Anurag
    Appreciation is a wonderful thing;
    It makes what is excellent in others belong to us as well.


  3. #3
    Join Date
    Nov 2000
    Posts
    245

    thanks

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