Tablespace
free-used:
SELECT
Total.name
"Tablespace Name",
Free_space,
(total_space-Free_space) Used_space,
total_space
FROM
(SELECT
tablespace_name,
sum(bytes/1024/1024)
Free_Space
FROM
sys.dba_free_space
GROUP
BY tablespace_name) Free,
(SELECT
b.name,
sum(bytes/1024/1024)
TOTAL_SPACE
FROM
sys.v_$datafile a,
sys.v_$tablespace
B
WHERE
a.ts# = b.ts#
GROUP
BY b.name) Total
WHERE
Free.Tablespace_name
= Total.name;
For
the tablespaces path Query :
SELECT substr(file_name, 1, 70), tablespace_name FROM
dba_data_files;
No comments:
Post a Comment