--查看表空间使用情况
select t1 "表空间",z/(1024*1024*1024) "总表空间",
z-s/(1024*1024*1024) "已用表空间",
s/(1024*1024*1024) "剩余表空间",
ROUND((z-s)/z*100,2) "使用率%"
from (select tablespace_name t1,sum(bytes) s
from dba_free_space group by tablespace_name),
(select tablespace_name t2,sum(bytes) z
from dba_data_files
group by tablespace_name) where t1 = t2
--查询表空间的数据文件
select file_name,tablespace_name,bytes,autoextensible,maxbytes from
dba_data_files where tablespace_name='USERS'
--初始化表空间大小
alter tablespace USERS add datafile 'D:\ORACLE\PRODUCT\10.2.0\DB_1\ORADATA\ORCL\USERS02.DBF'
size 1024m autoextend on next 200m maxsize unlimited;
--可以调整表空间扩展大小
alter database datafile 'D:\ORACLE\PRODUCT\10.2.0\DB_1\ORADATA\ORCL\USERS02.DBF' autoextend on next 200m maxsize unlimited;
原文链接:https://www.f2er.com/oracle/209109.html