我正在执行 insert into ... select ... from ... where ...
SQL 并使用 Oracle
出现以下错误:
java.sql.SQLException: ORA-12801: error signaled in parallel query server P004
ORA-01555: snapshot too old: rollback segment number 32 with name "_SYSSMU32_2039035886$" too small
我阅读了以下文档:http://www.dba-oracle.com/t_ora_12801_parallel_query.htm和 http://www.dba-oracle.com/t_ora_01555_snapshot_old.htm
说
ORA-12801
是因为没有足够的处理器来支持并行查询。 ORA-01555
错误与撤消存储不足或 undo_retention 参数的值太小有关。但是如何检查相关参数以避免此类问题再次发生?
最佳答案
来自 the manual :
ORA-12801: error signaled in parallel query server string
Cause: A parallel query server reached an exception condition.
Action: Check the following error message for the cause, and consult your error manual for the appropriate action.
这是一条通用错误消息,几乎与处理器不足无关。这是一个示例,说明您链接到的站点如何经常包含大量不良或过时的信息。也许 17 个进程在 17 年前“很多”,但今天不是。不幸的是,该网站通常是 Google 的第一个结果。
您可以检查 UNDO 保留时间,即以秒为单位的时间量,如下所示:
select value from v$parameter where name = 'undo_retention'
可用于 UNDO 表空间的空间量也与此相关:
select round(sum(maxbytes)/1024/1024/1024) gb
from dba_data_files
where tablespace_name like '%UNDO%';
再次参见 the manual 以获取有关该参数的更多信息。
关于sql - ORA-12801 : error signaled in parallel query server P004 and ORA-01555: snapshot too old,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29579352/