Database Administration (MOSC)

MOSC Banner

Size of Oracle Database

edited Mar 16, 2010 1:12AM in Database Administration (MOSC) 5 commentsAnswered
 Hi,

I would like to know how to calculate the size of the Database via an SQL query.

I know that I should add the datafiles and the redo logs. I even used the query below, yet it retreived a number different than that found via the EM.. Database Size(GB) under Space Summary

select a.data_size+b.temp_size+c.redo_size "total_size"
from ( select sum(bytes) data_size
        from dba_data_files ) a,
    ( select nvl(sum(bytes),0) temp_size
        from dba_temp_files ) b,
    ( select sum(bytes) redo_size
        from sys.v_$log ) c;

Thanks in advance

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center