set linesize 100
col database_size format a30
col used_space format a30
col free_space format a30
select
sum(used.bytes) / 1024 / 1024 / 1024 || ' GB' Database_Size,
sum(used.bytes) / 1024 / 1024 / 1024 - free.space / 1024 / 1024 / 1024 || ' GB' Used_space,
free.space / 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) space
from dba_free_space) free
group by free.space;
No comments:
Post a Comment