Home » RDBMS Server » Server Administration » Database Size ?
Database Size ? [message #55673] Fri, 07 February 2003 03:35 Go to next message
Suresh
Messages: 189
Registered: December 1998
Senior Member
How can I calculate the database size ? Does the full dump size is equivalent to the DB size?
Re: Database Size ? [message #55678 is a reply to message #55673] Fri, 07 February 2003 06:24 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
sum of all database files (datafiles) is the size of the database. it is not the ACTUAL SIZE OF THE DATBASE USED.
the following may help you( it is a part of my reporting script..so bear with the formating).
C:>cat sum.sql
COMPUTE SUM OF Growth_in_meg ON report;
COLUMN  growth_in_meg format 999,999,999
SELECT  to_char(creation_time, 'Month RRRR') Month_year,
        TRUNC(sum(bytes)/1024/1024) Growth_in_Meg
FROM    sys.v_$datafile
GROUP  BY  to_char(creation_time, 'Month RRRR');
clear breaks;
clear computes;
set head off;
SELECT 'Size of the database    : '|| TO_CHAR(Round(sum(bytes)/1048576, 2), '999,999.00') || ' MB'  from dba_data_files;
SELECT 'Free space              : '|| TO_CHAR(Round(sum(bytes)/1048576, 2), '999,999.00') || ' MB'  from dba_free_space;
SELECT 'Used space              : '|| TO_CHAR(Round(sum(bytes)/1048576, 2), '999,999.00') || ' MB'  from dba_segments;
set head on;
C:>sqlplus mag/mag

SQL*Plus: Release 8.1.6.0.0 - Production on Fri Feb 7 08:10:24 2003

(c) Copyright 1999 Oracle Corporation.  All rights reserved.

Connected to:
Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
With the Partitioning option
JServer Release 8.1.6.0.0 - Production

mag@itloaner1_local > @sum.sql

MONTH_YEAR     GROWTH_IN_MEG
-------------- -------------
August    2002           849
February  2003             1
January   2003             1
October   2002           150

Size of the database    :    1,001.75 MB

Free space              :      857.07 MB

Used space              :      144.55 MB

mag@itloaner1_local >

Re: Database Size ? [message #55695 is a reply to message #55673] Mon, 10 February 2003 09:27 Go to previous message
Sanjay
Messages: 236
Registered: July 2000
Senior Member
The size of the Full Dump size is NOT the size of the database.

Mahesh's post gives a more broad answer.

In short,
1. The sum of all the data files is the size of the database. (This is the ALLOCATED size)
2. This does NOT mean that your data is of that size. Your data will be some what like 60-70 % of Allocated size.
3. The sum of all the extents used is the actual size of the database.
Previous Topic: Accessing data in Excel from Oracle
Next Topic: Index Extents
Goto Forum:
  


Current Time: Fri Sep 20 05:01:12 CDT 2024