Ora-12805: Parallel Query Server Died Unexpectedly

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?

1

1 Answer

This is a problem for your DBA to resolve, as there are a large number of possible causes. Somebody needs to look in the Alert Log and check for trace files in the bdump directory for diagnostic info.

In the meantime, if you have only 415 records to delete you should just use straight SQL:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest