Home » RDBMS Server » Server Administration » how to check the used space in datafile
how to check the used space in datafile [message #146377] Thu, 10 November 2005 01:49 Go to next message
kamragulshan
Messages: 66
Registered: May 2005
Location: Delhi
Member
I have a database and now i wanted to check the used space in datafile so that i be able to estimate the space filled up daily. It will help me to analyze the space requirement and be able to manage the size of datafile and requirement to add the datafile.

Thanks

Gulshan
icon6.gif  Re: how to check the used space in datafile [message #146389 is a reply to message #146377] Thu, 10 November 2005 02:48 Go to previous message
nmacdannald
Messages: 460
Registered: July 2005
Location: Stockton, California - US...
Senior Member
TTI "Allocated, Used & Free space within datafiles"

COLUMN free_space_mb format 999999.90
COLUMN allocated_mb format 999999.90
COLUMN used_mb format 999999.90

SELECT SUBSTR (df.NAME, 1, 40) file_name, df.bytes / 1024 / 1024 allocated_mb,
((df.bytes / 1024 / 1024) - NVL (SUM (dfs.bytes) / 1024 / 1024, 0))
used_mb,
NVL (SUM (dfs.bytes) / 1024 / 1024, 0) free_space_mb
FROM v$datafile df, dba_free_space dfs
WHERE df.file# = dfs.file_id(+)
GROUP BY dfs.file_id, df.NAME, df.file#, df.bytes
ORDER BY file_name;

TTI off

Hope this helps!
Neil.
Previous Topic: How the check the space used in datafile
Next Topic: Moving Data Between Datafiles / Drooping Datafile
Goto Forum:
  


Current Time: Fri Jan 10 12:32:05 CST 2025