Environment: oracle 11g, spring-jdbc-3.2.2-RELEASE.jar, JDK 1.7, Oracle UCP driver.
I have a stored procedure which insert record to a table with CLOB column. The SP has
The limit for CLOB in Oracle is 176TB. 32KB is limit for VARCHAR. Your code somewhere uses implicit conversion from VARCHAR to CLOB. In Oracle CLOB must be OUTPUT paramater - even if you are inserting it. Oracle's API assumes that you create empty_clob() on database side, then you return a LOB locator to aplication. The application then uses this LOB locator as filehandle.
This behaviour is different from other databases.
PL/SQL has a hard limit of 32k chars if you send the data as a character string. If the parameter is a CLOB you can first create a temp LOB, fill it up with data and then call your PL/SQL procedure with the CLOB object.
It depend on your version of Oracle:
SetBigStringTryClob
property to true
in your DriverManager
.OraclePreparedStatement.setStringForClob
doc here.Also, this article may help you.