unable to extend table MAINFABCORETEST.HIST_INDICATOR_PROFILE by 1024 in tablespace MAINFABCORETEST

查询到失败原因是因为表的内存空间不足,依次执行下面的sql:
1、检查表的存储空间
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;


2、检查表的数据存储文件
SELECT file_name,
tablespace_name,
bytes / 1024 / 1024 "bytes MB",
maxbytes / 1024 / 1024 "maxbytes MB"
FROM dba_data_files
WHERE tablespace_name = 'SYSTEM';

 

 

3、检测表空间的自动扩展功能是否打开
SELECT file_id, file_name, tablespace_name, autoextensible, increment_by
FROM dba_data_files
WHERE tablespace_name = 'SYSTEM'
ORDER BY file_id desc;

 


4、表空间对应的空间和路径
SELECT * FROM dba_data_files t WHERE t.tablespace_name='SYSTEM';

 

 5、扩展10g空间

alter database datafile '/opt/oracle/oradata/ORCLCDB/system01.dbf' resize 10240M;
posted @ 2023-04-06 11:32  技术博客这里开始  Views(41)  Comments(0Edit  收藏  举报