Oracle空间查看和创建

来源:互联网 发布:原油交易软件 编辑:程序博客网 时间:2024/05/20 11:23


//查看表空间

select
b.file_name 物理文件名,
b.tablespace_name 表空间,
b.bytes/1024/1024 大小M,
(b.bytes-sum(nvl(a.bytes,0)))/1024/1024 已使用M,
substr((b.bytes-sum(nvl(a.bytes,0)))/(b.bytes)*100,1,5) 利用率
from dba_free_space a,dba_data_files b
where a.file_id=b.file_id
group by b.tablespace_name,b.file_name,b.bytes
order by b.tablespace_name




//显示当前用户所有分区表的详细分区信息:
select * from USER_TAB_PARTITIONS




创建表空间 
create tablespace user1 datafile 
'D:\oracle\product\10.2.0\oradata\orcl\user1_data.dbf' size 50M autoextend on next 10M maxsize unlimited
原创粉丝点击