Sunday, May 2, 2021

Find the size of an Oracle Database

 select round(sum(used.bytes) / 1024 / 1024 / 1024 ) || ' GB' "Database Size"

, round(sum(used.bytes) / 1024 / 1024 / 1024 ) -

round(free.p / 1024 / 1024 / 1024) || ' GB' "Used space"

, round(free.p / 1024 / 1024 / 1024) || ' GB' "Free space"

from (select bytes

from v$datafile

union all

select bytes

from v$tempfile

union all

select bytes

from v$log) used

, (select sum(bytes) as p

from dba_free_space) free

group by free.p;

1 comment:

  1. Hi Kumar,

    Database Application java cache file more than Gb, I did with Null the java cache file but Gb increasing how to check that log running request not solve the issues?

    ReplyDelete