gpt4 book ai didi

oracle - ORA-12805 :parallel query server died unexpectedly

转载 作者:行者123 更新时间:2023-12-04 18:12:51 48 4
gpt4 key购买 nike

我有一个像这样的 PL/SQL 脚本......

DECLARE
CURSOR curs_delete
IS
SELECT cus_num
FROM dob.cust_table GROUP BY cust_num HAVING COUNT(*)>1;
TYPE row_cust_num IS TABLE OF dob.cust_table.cust_num%TYPE;
col_cust_num row_cust_num;
BEGIN
OPEN curs_delete;
LOOP
FETCH curs_delete
BULK COLLECT INTO col_cust_num LIMIT 10000;
EXIT WHEN col_cust_num.EXISTS (1) = FALSE;
FORALL i IN 1 .. col_cust_num.LAST
DELETE FROM cust_table
WHERE cust_num = col_cust_num (i);
COMMIT;
END LOOP;
CLOSE curs_delete;
END;

此查询返回 ORA-12805:parallel query server died unexpectedly错误。我不确定为什么会这样。当我收到此错误时,游标中的选择查询返回了大约 415 条记录。

任何人都明白为什么会出现这个错误?

最佳答案

这是您的 DBA 需要解决的问题,因为有很多可能的原因。有人需要查看警报日志并检查 bdump 中的跟踪文件。诊断信息目录。

同时,如果您只有 415 条记录要删除,您应该直接使用 SQL:

DELETE FROM cust_table
WHERE cust_num in (SELECT cus_num
FROM dob.cust_table
GROUP BY cust_num HAVING COUNT(*)>1);

关于oracle - ORA-12805 :parallel query server died unexpectedly,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12274596/

48 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com