查看数据库表空间使用情况:
SELECT A.TABLESPACE_NAME,
A.BYTES/1024/1024 TOTAL,
B.BYTES/1024/1024 USED,
C.BYTES/1024/1024 FREE,
round((B.BYTES * 100) / A.BYTES,2) "% USED"
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
order by round((B.BYTES * 100) / A.BYTES,2) DESC;
查询制定表空间的数据文件:
select * from dba_data_files where tablespace_name='表空间名称'
扩充表空间:
ALTER TABLESPACE yzkf ADD DATAFILE '表空间的数据文件路径'
SIZE 4000M AUTOEXTEND ON NEXT 1M MAXSIZE 8000m;