Skip to content

Instantly share code, notes, and snippets.

@Voronenko
Created June 4, 2014 13:24
Show Gist options
  • Save Voronenko/05189d671acb80e4e8e6 to your computer and use it in GitHub Desktop.
Save Voronenko/05189d671acb80e4e8e6 to your computer and use it in GitHub Desktop.
SELECT
a.tablespace_name,
a.file_name,
a.bytes allocated_bytes,
b.free_bytes
FROM
dba_data_files a,
(SELECT file_id, SUM(bytes) free_bytes
FROM dba_free_space b GROUP BY file_id) b
WHERE
a.file_id=b.file_id
ORDER BY
a.tablespace_name;
-- ALTER DATABASE DATAFILE 'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF' AUTOEXTEND ON;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment