Friday, 16 August 2019 22:52

Misleading ORA- Message

Written by
Rate this item
(0 votes)

Oracle error messages are more or less the best in the industry but time-to-time they saddle you with a bad or misleading message. For example, I was running one of the

code modules from my Oracle Database 12c PL/SQL Programming book for a class exercise and got this error message:

BEGIN*ERROR AT line 1:ORA-22288: FILEOR LOB operation failedORA-06512: AT"STUDENT.LOAD_CLOB_FROM_FILE", line 71ORA-06512: AT line 11

BEGIN * ERROR at line 1: ORA-22288: file or LOB operation failed ORA-06512: at "STUDENT.LOAD_CLOB_FROM_FILE", line 71 ORA-06512: at line 11

Oddly enough, it was simple to identify generally. It failed on a call to the DBMS_LOB.LOADCLOBFROMFILE procedure. However, the better question is why did it fail because the virtual directory resolved and the permissions worked.

The first test was to try another file, which worked perfectly with the same code. That meant it had to be something with the physical file. I took a look and sure enough I found a character set problem, like the following:

… he reveals that the Nazgûl, or Ringwraiths, have left Mordor to capture the Ring and kill whoever carries it.


The group flees to the elvish realm of Lothlórien …

The “û” and “ó” characters were incompatible with the default NLS_LANG setting of the database and a CLOB limits the use of non-standard character sets. It’s ashamed that Oracle didn’t through a character set error, which would have expedited resolution of the problem.

As always, I hope this helps those looking for solutions.

Read 115 times

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.