I have a PL/SQL script like this...
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;
This query returns ORA-12805:parallel query server died unexpectedly
error. I'm not sure why it is happening. The select query in cursor returned around 415 records when i got this error.
Anyone understand why this error comes up?