Sure,

I haven't got around to using the dbms procedure yet,
but these are two queries I ended up with. I have
checked them on several tables and the results are the

same:

here, of course, 1 is the table name and 2 is the
owner. the tables need to be analyzed before running
these queries

select TOTAL_B_HWM - USED_B_HWM
from
(select blocks TOTAL_B_HWM from dba_tables
where table_name = UPPER('&&1') and owner=
UPPER('&&2')),
(select
count(unique(substr(dbms_rowid.rowid_to_restricted(rowid,0),15,4)
||
               
substr(dbms_rowid.rowid_to_restricted(rowid,0),1,8)))
USED_B_HWM
        from   &&2..&&1);

OR

select TOTAL - TOTAL_A_HWM - 1 - USED_B_HWM
from
(select blocks TOTAL FRom dba_segments
where segment_name = UPPER('&&1') and owner=
UPPER('&&2')),
(select empty_blocks TOTAL_A_HWM from dba_tables
where table_name = UPPER('&&1')),
(select
count(unique(substr(dbms_rowid.rowid_to_restricted(rowid,0),15,4)
||
               
substr(dbms_rowid.rowid_to_restricted(rowid,0),1,8)))
USED_B_HWM
        from   &&2..&&1);
undef 1 2

--- DENNIS WILLIAMS <[EMAIL PROTECTED]> wrote:
> Gene - Now that you've gotten your answer, would you
> mind to post both of
> the methods that you found to work so that the rest
> of us could learn?
> Thanks.
> Dennis Williams
> DBA
> Lifetouch, Inc.
> [EMAIL PROTECTED]
> 
> 
> -----Original Message-----
> Sent: Tuesday, December 18, 2001 7:05 AM
> To: Multiple recipients of list ORACLE-L
> 
> 
> Hi.
> 
> This is just to thank all who replied to my post.
> Based on what I read, I have got two different ways
> of
> calculating that number and they seem to produce the
> same result. 
> 
> thank you all (you know who you are)!!!!
> 
> 
> =====
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for
> all of
> your unique holiday gifts! Buy at
> http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
> -- 
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> -- 
> Author: Gene Gurevich
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- (858) 538-5051  FAX:
> (858) 538-5051
> San Diego, California        -- Public Internet
> access / Mailing Lists
>
--------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from).  You may
> also send the HELP command for other information
> (like subscribing).
> -- 
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> -- 
> Author: DENNIS WILLIAMS
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- (858) 538-5051  FAX:
> (858) 538-5051
> San Diego, California        -- Public Internet
> access / Mailing Lists
>
--------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from).  You may
> also send the HELP command for other information
> (like subscribing).


=====


__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Gene Gurevich
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to