一定要看完
解决方案:
1:以dba登录oracle
2:输入
select a.tablespace_name as "表空间名",
a.bytes / 1024 / 1024 as "表空间大小(M)",
(a.bytes - b.bytes) / 1024 / 1024 as "已使用空间(M)",
b.bytes / 1024 / 1024 "空闲空间(M)",
round(((a.bytes - b.bytes) / a.bytes) * 100, 2) "使用比"
from (select tablespace_name, sum(bytes) bytes
from dba_data_files
group by tablespace_name) a,
(select tablespace_name, sum(bytes) bytes, max(bytes) largest
from dba_free_space
group by tablespace_name) b
where a.tablespace_name = b.tablespace_name
order by ((a.bytes - b.bytes) / a.bytes) desc;
查看空间不足的表
结果
这里已经修改过了,一般出现oracle空间不足,百分百一般在99%左右
3:通过:
select tablespace_name,
file_id,
file_name as "表空间所在路径",
round(bytes / (1024 * 1024), 0) total_space
from dba_data_files
order by tablespace_name;
查询到文件对应的路径,然后扩容
结果:
4:扩容(这里的扩容是重新设置空间,不是在原来的基础上添加)
alter database datafile '得到的路径' resize 扩容大小M;
例如:alter database datafile 'H:\APP\ADMINISTRATOR\ORADATA\ORCL\USERS01.DBF' resize 50M;
5:如果你扩容之后发现还是报空间不足,请检查是否是连接的远程数据库,如果是,那就不是你电脑上oracle的原因,是服务器上的oracle空间不足
文章参考于:ORA-00604: error occurred at recursive SQL level 1ORA-01653: unable to extend table SYS.AUD$ by 8192
由程序帝国,编辑整理