5 réponses
Hello,
There are plenty of solutions
One of them:
SELECT A.tablespace_Name, A.Alloue, B.Occupe, C.Libre
2 FROM (select tablespace_name, sum(bytes)/1024/1024 AS ALLOUE from dba_data_files group by tablespace_name) a,
3 (select tablespace_name, Sum(bytes)/1024/1024 AS OCCUPE from dba_segments group by tablespace_name) b,
4 (select tablespace_name, Sum(bytes)/1024/1024 AS LIBRE from dba_free_space group by tablespace_name) c
5 WHERE B.tablespace_Name = A.tablespace_Name
6 AND C.Tablespace_Name = B.Tablespace_Name;
Google does provide a lot: try using the search criteria "know the size of a tablespace"
There are plenty of solutions
One of them:
SELECT A.tablespace_Name, A.Alloue, B.Occupe, C.Libre
2 FROM (select tablespace_name, sum(bytes)/1024/1024 AS ALLOUE from dba_data_files group by tablespace_name) a,
3 (select tablespace_name, Sum(bytes)/1024/1024 AS OCCUPE from dba_segments group by tablespace_name) b,
4 (select tablespace_name, Sum(bytes)/1024/1024 AS LIBRE from dba_free_space group by tablespace_name) c
5 WHERE B.tablespace_Name = A.tablespace_Name
6 AND C.Tablespace_Name = B.Tablespace_Name;
Google does provide a lot: try using the search criteria "know the size of a tablespace"
SELECT A.tablespace_Name, A.Alloue, B.Occupe, C.Libre
FROM (select tablespace_name, sum(bytes)/1024/1024 AS ALLOUE from dba_data_files group by tablespace_name) A
LEFT JOIN (select tablespace_name, Sum(bytes)/1024/1024 AS OCCUPE from dba_segments group by tablespace_name) B ON A.tablespace_Name = B.tablespace_Name
LEFT JOIN (select tablespace_name, Sum(bytes)/1024/1024 AS LIBRE from dba_free_space group by tablespace_name) C ON A.tablespace_Name = C.tablespace_Name
ORDER BY A.TABLESPACE_NAME;