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 <DWILLIAMS_at_LIFETOUCH.COM> 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.
> dwilliams_at_lifetouch.com
>
>
> -----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: g_u_r_e_v_i_c_h_at_yahoo.com
>
> 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: ListGuru_at_fatcity.com (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: DWILLIAMS_at_LIFETOUCH.COM
>
> 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: ListGuru_at_fatcity.com (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: g_u_r_e_v_i_c_h_at_yahoo.com
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: ListGuru_at_fatcity.com (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).
Received on Tue Dec 18 2001 - 12:22:28 CST