Monday, August 8, 2011

Database size with breakdown of datafiles, tempfiles, redologs and archivelogs

select
a.bytes "Data Files GB",
b.bytes "Temp Files GB",
c.bytes "Log Files GB",
d.bytes "Archive Logfiles 30 Days",
(a.bytes + b.bytes + c.bytes + d.bytes) "Total GB"
from
(select sum(bytes/1024/1024/1024) bytes from dba_data_files) a ,
(select sum(bytes/1024/1024/1024) bytes from dba_temp_files) b,
(select count(1) * 0.05859375 bytes from v$logfile) c,
(SELECT count(1) * 0.05859375 bytes from v$log_history
where to_date(first_time) > sysdate - 30) d

No comments:

Post a Comment

Oracle E-business suite logs clean up

 Oracle E-business suite logs clean up #!/bin/bash cd $EBS_DOMAIN_HOME find $EBS_DOMAIN_HOME -type f -path "*/logs/*.log?*" -mtime...