Created
November 4, 2016 21:24
-
-
Save sebastianwebber/13a1f07311a9420cf66298a7cb12a597 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Found on: http://techxploration.blogspot.com.br/2012/06/script-to-get-oracle-database-size.html | |
SET SERVEROUTPUT ON | |
Declare | |
ddf Number:= 0; | |
dtf Number:= 0; | |
log_bytes Number:= 0; | |
total Number:= 0; | |
BEGIN | |
select sum(bytes)/power(1024,3) into ddf from dba_data_files; | |
select sum(bytes)/power(1024,3) into dtf from dba_temp_files; | |
select sum(bytes)/power(1024,3) into log_bytes from v$log; | |
total:= round(ddf+dtf+log_bytes, 3); | |
dbms_output.put_line('TOTAL DB Size is: '||total||'GB '); | |
END; | |
/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment