ORA-29299 - Invalid Handle
Oracle 12c 12.1.0.1.0
We have a large amount of data rows stored in a table with each blob compressed using LZ_COMPRESSION in UTL_COMPRESSION
When we try to utl_compress.lz_uncompress_extract (during a CREATE TABLE AS, or bulk collect), we get a ORA-29299 error. The docs suggest closing all handles and ensuring they're valid. It quite happily works for one row, but when done in bulk after a couple of thousand rows, it starts to fail and then continues to fail. Having looked through the code, it appears to be closing handles and temporary lobs. I'm obviously missing something.