登录数据库后运行:select tablespace_name, sum(bytes)/1024/1024 from dba_data_files group by tablespace_name;
和select tablespace_name, sum(bytes)/1024/1024 from dba_free_space group by tablespace_name;
select tablespace_name, sum(bytes)/1024/1024 from dba_data_files group by tablespace_name;
select tablespace_name, sum(bytes)/1024/1024 from dba_free_space group by tablespace_name;
select tablespace_name,file_name,autoextensible from dba_data_files where tablespace_name='USERS';
添加表空间
alter tablespace USERS add datafile '/usr/u01/app/oradata/orcl/user02.dbf' SIZE 10G;
select a.tablespace_name, total, free, total-free as used from (select tablespace_name, sum(bytes)/1024/1024 as total from dba_data_files group by tablespace_name) a, (select tablespace_name, sum(bytes)/1024/1024 as free from dba_free_space group by tablespace_name) b where a.tablespace_name = b.tablespace_name;