Windchill报错“ORA-01691: Lob 段 WINDCHILL.SYS_LOB0000076153C00001$$ 无法通过 1024 (在表空间 BLOBS 中) 扩展“
原因:
Oracle数据库中一个数据文件的最大值(非lob)为32G,如果你的数据文件已经达到了32G,那么不管是插入数据还是建立索引,都会报错“无法通过128(在表空间xxxx中)扩展
解决方案:
官方给出以下几种方案:
1.为现有数据文件增加空间
2.允许当前的数据文件在需要时自动扩容,亦即当需要更大空间时,Oracle 将自动分配更多空间
(不建议使用数据文件所在磁盘的全部磁盘空间,这可能导致 Oracle 无法运行)
3.为当前表空间添加新的数据文件
4.高级操作:将占用磁盘空间最大的数据段移动至另一表空间或新建的表空间
命令:
找到表名和目标数据文件后,执行以下任一操作:
1.添加新的数据文件:
添加一个数据文件,初始为1个G,每次增加500M
alter tablespace BLOBS
add datafile '/opt/oracle/product/19c/dbhome_1/dbs/BLOBS03.dbf' SIZE 1024M AUTOEXTEND ON NEXT 500M MAXSIZE UNLIMITED;
关于SBOM创建时候,失败,有时候报错不能找到文件位置的情况,去掉绝对路径,直接写表名就可以,其中BLOBS04.dbf,要根据现有的编号进行增加:
alter tablespace BLOBS
add datafile 'BLOBS04.dbf' SIZE 1024M AUTOEXTEND ON NEXT 500M MAXSIZE UNLIMITED;
2.为现有数据文件增加空间:
A
L
T
E
R
D
A
T
A
B
A
S
E
D
A
T
A
F
I
L
E
′
<
d
a
t
a
f
i
l
e
n
a
m
e
>
′
R
E
S
I
Z
E
<
N
e
w
S
I
Z
E
>
M
;
ALTER DATABASE DATAFILE '<datafile_name>' RESIZE <New_SIZE>M;
ALTERDATABASEDATAFILE′<datafilename>′RESIZE<NewSIZE>M;
2.1、查看表空间的名字及文件在哪
–查看表空间的名字及文件在哪
select tablespace_name,
file_id,
file_name,
round(bytes / (1024 * 1024), 0) total_space
from dba_data_files
order by tablespace_name;
2.2、查询表空间使用情况
select a.tablespace_name,
a.bytes / 1024 / 1024 "sum MB",
(a.bytes - b.bytes) / 1024 / 1024 "used MB",
b.bytes / 1024 / 1024 "free MB",
round(((a.bytes - b.bytes) / a.bytes) * 100, 2) "used%"
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
参考:https://blog.csdn.net/qq_42361748/article/details/106790746
考:https://blog.csdn.net/qq_42361748/article/details/106790746
https://blog.51cto.com/gblfy/5652544#_1