电脑技术学习

ORA-01650

dn001

  
数据库很多表频繁报错 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;;;;;
WHEREtablespace_name = 'MOTOROLA';

MAX(BYTES)
----------
2126503936

这个结果明显比表的设置 next extent= 1024k 要大
那我们看看RPT_MOT_CELL_PER的参数

SELECT next_extent, pct_increase, tablespace_name;
FROMdba_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;;;;;
WHEREtablespace_name = 'MOTOROLA';
————————

47212

SELECT count(*);;
FROM;dba_free_space;;;;;
WHEREtablespace_name = 'MOTOROLA'
and bytes<1048576;
————————

47208

大部分extent都是小与1m的所以不能分配 Oracle不会去找最大!















标签: