ORA-01001: invalid cursor

I get oracle error ORA-01001: invalid cursor during production when the number of transactions is processed in bulk. However, the same code works fine in development.

I need to know when there may be ORA-01001: invalid cursor in the update request. I did some searches and found that there are two ways to get this error:

  • Is the number of open cursors more than MAXCURSOR allowed?
  • An attempt was made to make a selection without opening the cursor.

Has anyone encountered the same problem that I described above? Please suggest solutions.

+4
source share
1 answer

Yes, these are common reasons (see also this if you have not already done so).

Given that you are using two different environments (dev / prod), have you confirmed that the MAXCURSOR parameter is the same (or that Prod MAXCURSOR> Dev MAXCURSOR)?

You should also examine your batch process and see if the amount of data can cause your process to open more cursor in prod. Example: your batch runs a stored procedure for each department code in the partition table, and each instance of this procedure opens N cursors.

If you have - say - 3 off. codes in dev, because this is enough for your tests, and 34 department codes in Prod, you can use the cursor 10 times and get into the same situation ...

+3
source

Source: https://habr.com/ru/post/1303210/


All Articles