数据库很多表频繁报错 ora-01688 ora-01650 等错误
ora-01650: unable to extend rollback segment %s by %s in tablespace %s
cause: failed to allocate extent for the rollback segment in tablespace.
action: use the alter tablespace add datafile statement to add one or more files to the specified tablespace.
从原因上看 unable to extend 是因为没有邻近的空间可以去扩展
报错的是motorola表空间
首先!我的所有表的next 都是1m pctincrease 0
所以我就先去查motorola 所在表空间最大的邻近空间
sql>select max(bytes)
from dba_free_space
where tablespace_name = motorola;
max(bytes)
———-
2126503936
这个结果明显比表的设置 next extent= 1024k 要大
那我们看看rpt_mot_cell_per的参数
select next_extent, pct_increase, tablespace_name
from dba_tab_partitions
where partition_name=p9 and table_owner = mot_nmc and table_name=rpt_mot_cell_per;
next_extent pct_increase
———– ————
tablespace_name
————————————————————
1048576 0
motorola
metalink上提供了解决方法:
1.alter tablespace motorola coalesce;
the extents must be adjacent to each other for this to work
我用了!没有用
2 add datafile 或者 resize
这个明显是有效果的!后来我加了数据文件以后也是有效果的!
3.修改next
这个也是有效的
后来我发现我的思路有问题了
早最大的extent 并没有用!
select count(*)
from dba_free_space
where tablespace_name = motorola;
————————
47212
select count(*)
from dba_free_space
where tablespace_name = motorola
and bytes<1048576;
————————
47208
大部分extent都是小与1m的所以不能分配 oracle不会去找最大!
