报错问题:
定时任务执行后发现后台一直再报错,不同的任务报的以下两个错误,字面意思大概理解到是表空间不足的问题
--ORA-01691: unable to extend lob segment MADB.SYS_1111 by 128 in tablespace XXX_TS
--ORA-01653: unable to extend table MADB1.INFO by 8 in tablespace XXX_TS
解决方法
--查询库中所有表空间使用情况
SELECT a.tablespace_name "表空间名称",
a.bytes / 1024 / 1024 "表空间大小(M)",
(a.bytes - b.bytes) / 1024 / 1024 "已使用空间(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;
----查询指定表空间文件路径等信息
SELECT file_id, file_name, tablespace_name, autoextensible, increment_by
FROM dba_data_files
WHERE tablespace_name = 'XXX_TS'
ORDER BY file_id desc;
--修改表空间大小为4096m
alter database datafile 'file_name' resize 需扩展大小(单位M);
--修改表空间为自动增长
alter database datafile 'file_name' autoextend on next 500M maxsize unlimited











网友评论