Create Or Replace Force View Sys.Av_db_df_free_space (Tablespace_name,
File_name,
Allocated_mb,
Used_mb,
Free_space_mb
)
As
Select Dfs.Tablespace_name, 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.Tablespace_name, Dfs.File_id, Df.Name, Df.File#, Df.Bytes
Order By Dfs.Tablespace_name;
File_name,
Allocated_mb,
Used_mb,
Free_space_mb
)
As
Select Dfs.Tablespace_name, 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.Tablespace_name, Dfs.File_id, Df.Name, Df.File#, Df.Bytes
Order By Dfs.Tablespace_name;
No comments:
Post a Comment