Here's a modification of one that I use
1 select
2 tablespace_name, MB_FREE, MB_TOTAL,mb_total-mb_free mb_used,
3 round((MB_TOTAL-MB_FREE)/MB_TOTAL*1000)/10 pct_used
4 from
5 (select tablespace_name, trunc(sum(free_bytes/1024)) MB_FREE , sum(total_bytes/1024) MB_TOTAL
6 from
7 (
8 (select tablespace_name, sum(bytes)/1024 free_bytes,
9 00 total_bytes
10 from dba_free_space
11 group by tablespace_name)
12 union
13 (select t.tablespace_name tablespace_name,
14 00 free_bytes,
15 sum(d.bytes)/1024 total_bytes
16 from
17 dba_tablespaces t, dba_data_files d
18 where t.tablespace_name = d.tablespace_name
19 group by t.tablespace_name)
20 )
21 group by tablespace_name)
22 --where mb_free > 200
23* order by 1
-----Original Message-----
From: Cale, Rick T (Richard) [SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, September 19, 2001 11:05 AM
To: Multiple recipients of list ORACLE-L
Subject: RE: sizeiof table!!!
Does anyone have a script that gives actual space used instead of size of
extents allocated?
Thanks
Rick
-----Original Message-----
Sent: Wednesday, September 19, 2001 10:05 AM
To: Multiple recipients of list ORACLE-L
Select sum(bytes) / 1048576 "Size in Mb"
From dba_extents
Where owner = upper('&owner')
and segment_name = upper('&tablename');
"Do not criticize someone until you walked a mile in their shoes, that way
when you criticize them, you are a mile a way and have their shoes."
Christopher R. Spence
Oracle DBA
Phone: (978) 322-5744
Fax: (707) 885-2275
Fuelspot
73 Princeton Street
North, Chelmsford 01863
-----Original Message-----
Sent: Tuesday, September 18, 2001 1:05 PM
To: Multiple recipients of list ORACLE-L
Hi gurus,
I need get the size in bytes of any table!!!
thanks!!!
@lex
------------------------------------------------------------
Lic. Alexander Ord��ez Arroyo
Caja Costarricense del Seguro Social
Soporte T�cnico - Divisi�n de Inform�tica
Telefono: 295-2004, San Jos�, Costa Rica
[EMAIL PROTECTED] Icq# 30173325
------------------------------------------------------------
The true is out there in WWW
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Alexander Ordonez
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: Christopher Spence
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: Cale, Rick T (Richard)
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).
