We have a requirement to move files from file system to Database. Currently all files are stored in file system and linked as BFILE in some table and we need to read those through BFILE and move to another table in BLOB Column.
I am referring below link from Oracle to do that.
https://docs.oracle.com/cd/B10501_01/appdev.920/a96591/adl12bfl.htm#879707
My code is exactly same, the only thing is I am calling this piece of code for huge number of files (around 100K) in a for loop.
It ran fine till 65,536 files. After that it throw below exception.
java.sql.SQLException: ORA-20001: ORA-04025: maximum allowed library object lock allocated for SYS.DOC_STORAGE_DIR ORA-06512: at "SYS.DBMS_LOB", line 946
Could someone please help in this and help me to understand the reason for the error and how to solve this?
Appreciate the help.