/ Published in: SQL
This SQL will quickly show you approximately how big your database is, expressed in various units of measurement.
Expand |
Embed | Plain Text
SELECT SUM(bytes) AS Bytes , ROUND(SUM(bytes)/POWER(1000,1)) AS KiloBytes , ROUND(SUM(bytes)/POWER(1000,2)) AS MegaBytes , ROUND(SUM(bytes)/POWER(1000,3)) AS GigaBytes , ROUND(SUM(bytes)/POWER(1000,4)) AS TeraBytes , ROUND(SUM(bytes)/POWER(1000,5)) AS PetaBytes , ROUND(SUM(bytes)/POWER(1000,6)) AS ExaBytes , ROUND(SUM(bytes)/POWER(1000,7)) AS ZettaBytes , ROUND(SUM(bytes)/POWER(1000,8)) AS YottaBytes FROM dba_data_files ;
You need to login to post a comment.
