Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Actual size of database
Below is the most complete tablespace script I have found. I think you will like it.
set pagesize 80 linesize 100 feedback off
column tablespace_name heading Tablespace format a19
column object_count heading 'Objects|(#)' format 999990
column mb heading Mb format 9990
column sum(frags) heading 'Frags|(#)' format 9999
column avail heading 'Max|(Mb)' format 9999.99
column free heading 'Free|(%)' format 999.9
column bytesize heading 'Size|(Mb)' format 9999999 column byteused heading 'Used|(Mb)' format 9999990 column bytefree heading 'Free|(Mb)' format 9999999 column init_ext heading 'Initial|(K)' format 999999 column next_ext heading 'Next|(K)' format 999999break on report
select tablespace_name,
sum(obj_cnt) object_count, sum(ini_ext) init_ext, sum(nex_ext) next_ext, sum(byte)/1048576 bytesize, (sum(byte)/1048576)- (sum(fbyte)/1048576) byteused, sum(fbyte)/1048576 bytefree,
0 obj_cnt, 0 ini_ext, 0 nex_ext,
-----Original Message-----
Sent: Tuesday, May 01, 2001 1:41 PM
To: Multiple recipients of list ORACLE-L
Here is one that I use. I do not count the TEMP tablespace and the RBS tablespace because these vary in size.
SELECT sum(bytes) DB_SIZE from dba_segments where tablespace_name not in ('RBS','TMP')
You can do more math if you do not want the answer in bytes.
Regards,
Ruth
----- Original Message -----
To: "Multiple recipients of list ORACLE-L" <ORACLE-L_at_fatcity.com>
Sent: Tuesday, May 01, 2001 2:11 PM
> Hi All,
>
> Oracle 8.0.5 NT 4
> Does anyone have a script they would share that can calculate the ACTUAL
> size of a database(space_used) not what has been allocated?
>
> Thanks
> Rick
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Cale, Rick T (Richard)
> INET: RICHARD.T.CALE_at_saic.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: Ruth Gramolini INET: rgramolini_at_tax.state.vt.us 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: Smith, Ron L. INET: rlsmith_at_kmg.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 May 01 2001 - 12:52:16 CDT
![]() |
![]() |