SELECT tablespace_name, SUM(bytes_used)/1024/1024 MB_USED,
SUM(bytes_free)/1024/1024 MB_FREE
FROM V$temp_space_header GROUP BY tablespace_name;
HOW TO CHECK TABLESPACE SIZE
CHECK SIZE OF DATABASE
SQL) select round(sum(Gig),2) Gig from
(
select sum(bytes)/(1024*1024*1024) Gig from dba_data_files
union
select sum(bytes)/(1024*1024*1024) Gig from dba_temp_files
union
select sum(v$log.bytes)/(1024*1024*1024) Gig from v$log, v$logfile
where v$log.group# = v$logfile.group#
)
Query to see the Reserved, Used and Free space of your database
SELECT r.tablespace_name, reserved_space "RESERVED_SPACE(MB)",
reserved_space - free_space "USED_SPACE(MB)",
free_space "FREE_SPACE(MB)"
FROM (SELECT tablespace_name, SUM (BYTES)
/ (1024 * 1024) reserved_space
FROM dba_data_files
GROUP BY tablespace_name) r,
(SELECT tablespace_name, SUM (BYTES) / (1024 * 1024) free_space
FROM dba_free_space
GROUP BY tablespace_name) f
WHERE r.tablespace_name = f.tablespace_name
ORDER BY r.tablespace_name;
SQL> select username,status,type from v$session;
SQL> desc DBA_ROLE_PRIVS
SQL> select name,open_mode from v$database
SQL> set lines 120
SQL> col FILE_NAME for a55;
select tablespace_name,sum(bytes)/1024/1024 from dba_free_space
group by tablespace_name;
'user_data' order by 2 desc;
alter tablespace BUMT_DATA01 add datafile’/oradata/fs03/bumt1p/bumt_data01_41.dbf’ size 10240m
SQL> /
select a.TABLESPACE_NAME, a.BYTES MB_TOTAL, b.BYTES MB_free, b.largest,
round(((a.BYTES-b.BYTES)/a.BYTES)*100,2)