You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

SELECT NVL(b.tablespace_name,
       NVL(a.tablespace_name,'UNKOWN')) name,
       round(kbytes_alloc/1024,2) Mbytes,
       round((kbytes_alloc-NVL(kbytes_free,0))/1024,2) used,
       round(NVL(kbytes_free,0)/1024,2) free,
       round(((kbytes_alloc-NVL(kbytes_free,0))/kbytes_alloc)*100,2) pct_used
FROM ( SELECT SUM(bytes)/1024 Kbytes_free,
              tablespace_name
       FROM  sys.dba_free_space
       GROUP BY tablespace_name ) a,
     ( SELECT SUM(bytes)/1024 Kbytes_alloc,
                          SUM(maxbytes)/1024 kbytes_max,
              tablespace_name
       FROM sys.dba_data_files
       GROUP BY tablespace_name )b
WHERE a.tablespace_name (+) = b.tablespace_name
ORDER BY PCT_USED;

see table spaces

SELECT file_name, autoextensible, tablespace_name FROM sys.dba_data_files;

resize

ALTER DATABASE DATAFILE '/u01/app/oracle/oradata/XE/ts_DB.dbf' RESIZE 2G;
  • No labels