Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How do I find out free space in extent?

Re: How do I find out free space in extent?

From: Violin <violin.hsiao_at_mail.pouchen.com.tw>
Date: 22 Dec 1999 02:50:22 GMT
Message-ID: <38613c51.3217258@172.16.7.5>


On Tue, 21 Dec 1999 11:37:40 -0000, "Andrew Williamson" <andrewweb_at_my-deja.com> wrote:

Or like this :

set serveroutput on
declare

   tot_block                  number;
   tot_byte                    number;
   unuse_block          number;
   unuse_byte            number;
   last_ext_file_id      number;
   last_ext_blok_id   number;
   last_block               number;

begin
dbms_space.unused_space('SCOTT','EMP','TABLE',tot_block,tot_byte,unuse_block,unuse_byte,last_ext_file_id,last_ext_blok_id,last_block);
   dbms_output.put_line(to_char(tot_block));
   dbms_output.put_line(to_char(tot_byte));
   dbms_output.put_line(to_char(unuse_block));
   dbms_output.put_line(to_char(unuse_byte));
   dbms_output.put_line(to_char(last_ext_file_id));
   dbms_output.put_line(to_char(last_ext_blok_id));
   dbms_output.put_line(to_char(last_block));
end;
/

>Can anyone tell me how to find out how much of my extent is actually used?
>ie, if I make a 50mb initial extent for a table and insert one 1mb record,
>what dictionary table will tell me I am using 1mb of that extent with 49mb
>free? Or do I need to do something weird with rowids?
>
>This is all going into an automated tablespace report generator which I'll
>post when it's finished along with an HTML historical growth monitor. Thanks
>in advance for any help.
>
>Andrew
>
Received on Tue Dec 21 1999 - 20:50:22 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US