We've recently migrated from Oracle 9i to Oracle 10g, and
Java code that used to work now causes Oracle to hang.
The code involves inserting a CLOB into a database.
We first insert many other values and an EMPTY_CLOB(), as in the following:
This statement works fine. We then try to insert the CLOB.
A typical value of query is:
This code works fine in Oracle 9i, but in Oracle 10g, Oracle hangs, and we find a lock on the row in the table that we are trying to update.
Some Googling revealed that Oracle 10g has a more efficient way of inserting CLOBs. We set the value of connectionProperties to SetBigStringTryClob=true in the XML that defines DataSource for the
JDBC driver, and we used the following code to try to insert the CLOB:
But Oracle still hangs.
We haven't had any problems inserting BLOBs, VARCHAR2s, and other data types into the table. The code for BLOBs is pretty much the same as the original CLOB code, and it works fine.
Any advice?