Tag Archives: size

Determining the total size of an Oracle Database.

When using any RDBMS there exist a distinct difference between the actual size of the data and the physical size of the database. The physical size on disk is defined as the space required for the database to operate (also known as the “foot print”). This article will discuss the components which make up the physical size of the database and how to determine that size within Oracle. NOTE: This does not include determining of OS layer database objects (Control Files, Binaries, Log Files, and Trace files ).

Components which make-up the physical size of an Oracle database:
1. Data Files
2. Temporary Files
3. Redo Logs
4. Archive log Files

1. Logon to your Oracle database server as the Oracle software owner.

2. Logon to SQLPLUS with SYSDBA privileges.

mylinux:> sqlplus ‘/ as sysdba’

SQL*Plus: Release 10.2.0.4.0 – Production on Thu Mar 04 21:19:51 2010

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

3. Execute the following SQL to get the size of all Data files: select
sum(bytes)/1024/1024 from dba_data_files;

SQL> select sum(bytes)/1024/1024 from dba_data_files;

SUM(BYTES)/1024/1024
——————–
473824.297

SQL>

4. Execute the following SQL to get the size of all Temporary files: select sum(bytes)/1024/1024 from dba_temp_files;

SQL> select sum(bytes)/1024/1024 from dba_temp_files;

SUM(BYTES)/1024/1024
——————–
46082

SQL>

5. Execute the following SQL to get the size of all redo logs: select
sum(bytes)/1024/1024 from v$log;

SQL> select sum(bytes)/1024/1024 from v$log;

SUM(BYTES)/1024/1024
——————–
1200

SQL>

6. Execute the following SQL to get the size of all archive redo logs: select sum(block_size*blocks)/1024/1024 from v$archived_log;

SQL> select sum(block_size*blocks)/1024/1024 from v$archived_log;

SUM(BLOCK_SIZE*BLOCKS)/1024/1024
——————————–
136885.281

SQL>

7. This completes the physical size of an Oracle database.

Larry Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

Determining actual size of data stored in an Oracle RDBMS.

When using any RDBMS there exist a distinct difference between the actual size of the data and the physical size of the database. In this article we will demonstrate how to get the actual size of the data stored in an Oracle RDBMS.

1. Logon to your Oracle database server as the Oracle software owner.

2. Logon to SQLPLUS with SYSDBA privileges.

mylinux:> sqlplus ‘/ as sysdba’

SQL*Plus: Release 10.2.0.4.0 – Production on Mon Mar 01 17:17:02 2010

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

3. Select the sum of all bytes allocated in the view DBA_SEGMENTS, returns the actual space being consumed on disk.

SQL> select sum(bytes)/1024/1024 from dba_segments;

SUM(BYTES)/1024/1024
——————–
316865.805

4. This completes the determining the actual size of data in an Oracle database.

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com