--1.首先查看表空间的名字和所属文件
select tablespace_name,
file_id,
file_name,
round(bytes / (1024 * 1024), 0) total_space
from dba_data_files
order by tablespace_name;
--3.手动增加数据文件尺寸
ALTER DATABASE DATAFILE '/ORACLE/PRODUCT/10.2.0/ORADATA/HYXTBGXT/MMZJK_DATA.DBF' RESIZE 4096M;
--4.设定数据文件自动扩展
ALTER DATABASE DATAFILE '/ORACLE/PRODUCT/10.2.0/ORADATA/HYXTBGXT/MMZJK_DATA.DBF' AUTOEXTEND ON NEXT 50M MAXSIZE UNLIMITED;
--5.设定后查看表空间信息
SELECT A.TABLESPACE_NAME,
round(A.BYTES / (1024 * 1024), 2) as TOTAL,
round(B.BYTES / (1024 * 1024), 2) as USED,
round(C.BYTES / (1024 * 1024), 2) as FREE,
round((B.BYTES * 100) / A.BYTES, 2) "% USED",
round((C.BYTES * 100) / A.BYTES, 2) "% FREE"
FROM SYS.SM$TS_AVAIL A, SYS.SM$TS_USED B, SYS.SM$TS_FREE C
WHERE A.TABLESPACE_NAME = B.TABLESPACE_NAME
AND A.TABLESPACE_NAME = C.TABLESPACE_NAME
oracle 查看表空间
最新推荐文章于 2023-02-11 22:00:15 发布