Oracle

--查看表空间大小
select d.tablespace_name tablespace_name,total_M,total_M-free_M use_M,free_M,round((total_M-free_M)/total_M*100,2)||'%' use_per
from
(select tablespace_name,round(sum(bytes)/1024/1024,2) total_M from dba_data_files group by tablespace_name) d,
(select tablespace_name,round(sum(bytes)/1024/1024,2) free_M from dba_free_space group by tablespace_name) f
where d.tablespace_name=f.tablespace_name order by (total_M-free_M)/total_M desc;
--查看表空间大小

--查看表空间路径
select file_name from dba_data_files;


--增加表空间
alter tablespace importal add datafile '/u01/app/oracle/oradata/orcl/importal02.dbf' size 20g autoextend on;

posted on 2016-12-22 14:30  菜菜菜鸟的it路  阅读(139)  评论(0编辑  收藏  举报