其他分享
首页 > 其他分享> > ORA-01653: unable to extend table keep.ic_log by 128 in tablespace IDX_LOG

ORA-01653: unable to extend table keep.ic_log by 128 in tablespace IDX_LOG

作者:互联网

今天同事反馈数据库写表存在问题,平常写表的数据量每天上万条,最近只有几十条。
说查了表空间使用率,没发现问题
---查询永久表空间使用率
set lines 2000
col USED_PER for a60
SELECT A.TABLESPACE_NAME AS TABLESPACE_NAME,
ROUND(TOTAL/1024/1024/1024,3) AS TOTAL_GB,
ROUND(FREE/1024/1024/1024,2) AS FREE_GB,
ROUND(( TOTAL - FREE )/1024/1024/1024,2) AS USED_GB,
TO_CHAR(ROUND(( TOTAL - FREE ) / TOTAL * 100, 2),'90.99')||'%' AS USED_PER
FROM (SELECT TABLESPACE_NAME,
SUM(BYTES) FREE
FROM DBA_FREE_SPACE
GROUP BY TABLESPACE_NAME) A,
(SELECT TABLESPACE_NAME,
SUM(BYTES) TOTAL
FROM DBA_DATA_FILES
GROUP BY TABLESPACE_NAME) B
WHERE A.TABLESPACE_NAME = B.TABLESPACE_NAME
order by USED_PER desc;
显示结果28条,没发现表空间IDX_LOG相关信息。

最近项目也没有变更事项,很奇怪,我查了下数据库alert日志,
发现有报错:ORA-01653: unable to extend table keep.ic_log by 128 in tablespace IDX_LOG
提示写表时索引表空间IDX_LOG不足。

于是我在数据文件字典表中查看
select distinct TABLESPACE_NAME,STATUS from dba_data_files order by TABLESPACE_NAME;查看,显示结果有29条。

dba_tablespaces和dba_data_files都有,status也正常,DBA_FREE_SPACE没有

回头去看查询表空间使用率的语句,其中有一段sql:
SELECT TABLESPACE_NAME,
SUM(BYTES) FREE
FROM DBA_FREE_SPACE
GROUP BY TABLESPACE_NAME;
这段查询结果并没有IDX_LOG相关信息。

dba_tablespaces和dba_data_files都有,DBA_FREE_SPACE没有

解决方法:
增加表空间得到解决,使用率的sql和DBA_FREE_SPACE可以查到了。
ALTER TABLESPACE IDX_LOG ADD DATAFILE '/opt/oradata/keep/IDX_LOG02.dbf' SIZE 8G;

标签:1024,log,extend,01653,FREE,IDX,TABLESPACE,TOTAL,NAME
来源: https://www.cnblogs.com/connected/p/15169275.html