The Oracle Database 12c documentation says you can set
the maximum size of a VARCHAR2 to 32,767 bytes.
That’s true except when you’re trying to map a large Java string
to a VARCHAR2. It fails when the physical size of
the Java string is greater than 4,000 bytes with an
ORA-01002 or fetch out of sequence error.
SELECT read_text_file('C:\Data\loader\Hobbit1.txt')
*
ERROR at line 1:
ORA-24345: A Truncation or null fetch error occurred
ERROR:
ORA-01002: fetch out of sequence
|
You need to grant privileges before you can test this code. You
can grant privileges by connecting as the SYS user
of a CDB (or non-multitenant database) or as the ADMIN user of a
PDB with the AS SYSDBA clause. Then, you run the
following command to grant external file access to the JVM inside
Oracle Database 12c: