1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
SELECT a.tablespace_name "表空间名",
a.bytes / 1024 / 1024 "表空间大小(M)",
(a.bytes - b.bytes) / 1024 / 1024 "已使用空间(M)",
b.bytes / 1024 / 1024 "空闲空间(M)",
round(((a.bytes - b.bytes) / a.bytes) * 100, 2) "使用比"
FROM (SELECT tablespace_name, sum(bytes) bytes
FROM dba_data_files
GROUP BY tablespace_name) a,
(SELECT tablespace_name, sum(bytes) bytes, max(bytes) largest
FROM dba_free_space
GROUP BY tablespace_name) b
WHERE a.tablespace_name = b.tablespace_name
ORDER BY ((a.bytes - b.bytes) / a.bytes) DESC
alter tablespace SYSAUX add datafile 'SYSAUX02.dbf' size 5G ;
alter tablespace SYSTEM add datafile 'SYSTEM02.dbf' size 10G ;
select distinct dfs.tablespace_name, df.name from dba_free_space dfs left join v$datafile df on dfs.file_id = df.FILE# order by dfs.tablespace_name;
oracle-ORA-01653: unable to extend table SYS.AUD$ by 8192 in tablespace SYSTEM