← Space Management
Oracle · Space Management
How to check total datafile size created per month in Oracle
Summarize Oracle datafile creation by year and month with total size in GB from V$DATAFILE.
Tested on11g12c18c19c21c23ai26ai
Rollup datafile creation_time by year and month. Rough proxy for when tablespaces were expanded — spikes here often line up with data growth events, migrations, or restore points.
SELECT TO_CHAR(creation_time, 'RRRR') AS year,
TO_CHAR(creation_time, 'MM') AS month,
ROUND(SUM(bytes) / 1024 / 1024 / 1024) AS gb
FROM v$datafile
GROUP BY TO_CHAR(creation_time, 'RRRR'),
TO_CHAR(creation_time, 'MM')
ORDER BY 1, 2;spacedatafilegrowthv$datafile